1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Fix two place where the directory offset wasn't tracked correctly.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5675 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-06-03 15:01:32 +00:00
parent 55463bbf91
commit 5f43589885

View File

@ -32,18 +32,21 @@ struct dirent* __fastcall__ readdir (register DIR* dir)
/* errno already set */
goto exitpoint;
}
dir->off += 2;
/* Read the number of blocks */
if (!_dirread (dir, &entry.d_blocks, sizeof (entry.d_blocks))) {
goto exitpoint;
}
/* Adjust the directory offset */
dir->off += 4;
/* Read the next file entry into the buffer */
for (count = 0, b = buffer; count < sizeof (buffer); ++count, ++b) {
for (count = 0, b = buffer; count < sizeof (buffer); ++b) {
if (!_dirread1 (dir, b)) {
goto exitpoint;
}
++count;
if (*b == '\0') {
break;
}