X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tools%2Fgcda.c;fp=tools%2Fgcda.c;h=d60161d5d0dc6efe7a78513f93f7d79b4f83e686;hb=110df09c8a2479c6a58655ad6b09b50584fbe5f4;hp=1fb6baf3c84d35bfab309b304738dbde2bbcc1a2;hpb=81fda4e8d854c96e70dc2e6b7cd2f48a51f55d86;p=picodrive.git diff --git a/tools/gcda.c b/tools/gcda.c index 1fb6baf..d60161d 100644 --- a/tools/gcda.c +++ b/tools/gcda.c @@ -35,6 +35,7 @@ static int is_good_path(char *path) fclose(f); return 1; } + printf("not good path: %s\n", path); return 0; } @@ -68,7 +69,7 @@ readnext: { pos1 = search_gcda(buff + pos, l - pos); if (pos1 < 0) { - fseek(f, -5, SEEK_CUR); + fseek(f, -6, SEEK_CUR); goto readnext; } pos += pos1; @@ -76,7 +77,7 @@ readnext: while (pos > 0 && is_good_char(buff[pos-1])) pos--; if (pos == 0) { - fseek(f, -16, SEEK_CUR); + fseek(f, -(sizeof(buff) + 16), SEEK_CUR); goto readnext; }