mirror of
https://github.com/cc65/cc65.git
synced 2025-02-09 17:33:00 +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:
parent
55463bbf91
commit
5f43589885
@ -32,18 +32,21 @@ struct dirent* __fastcall__ readdir (register DIR* dir)
|
|||||||
/* errno already set */
|
/* errno already set */
|
||||||
goto exitpoint;
|
goto exitpoint;
|
||||||
}
|
}
|
||||||
dir->off += 2;
|
|
||||||
|
|
||||||
/* Read the number of blocks */
|
/* Read the number of blocks */
|
||||||
if (!_dirread (dir, &entry.d_blocks, sizeof (entry.d_blocks))) {
|
if (!_dirread (dir, &entry.d_blocks, sizeof (entry.d_blocks))) {
|
||||||
goto exitpoint;
|
goto exitpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Adjust the directory offset */
|
||||||
|
dir->off += 4;
|
||||||
|
|
||||||
/* Read the next file entry into the buffer */
|
/* 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)) {
|
if (!_dirread1 (dir, b)) {
|
||||||
goto exitpoint;
|
goto exitpoint;
|
||||||
}
|
}
|
||||||
|
++count;
|
||||||
if (*b == '\0') {
|
if (*b == '\0') {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user