X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libsrc%2Fcbm%2Fopendir.c;h=fe7fecb20a942e8fa2ff69c369267e9efef7fa11;hb=6a92d8b987ef98b97fced19533573c9e74b208a9;hp=c89b3893f22b3ef8aa1f4ded96829cdd85426037;hpb=4e0cbcf33fd718f7cd36e06070e13be8e232ee9e;p=cc65 diff --git a/libsrc/cbm/opendir.c b/libsrc/cbm/opendir.c index c89b3893f..fe7fecb20 100644 --- a/libsrc/cbm/opendir.c +++ b/libsrc/cbm/opendir.c @@ -13,7 +13,7 @@ DIR* __fastcall__ opendir (register const char* name) { - unsigned char buf[32]; + unsigned char buf[2]; DIR* dir = 0; DIR d; @@ -38,8 +38,8 @@ DIR* __fastcall__ opendir (register const char* name) d.fd = open (d.name, O_RDONLY); if (d.fd >= 0) { - /* Skip the disk header */ - if (_dirread (&d, buf, 32)) { + /* Skip the load address */ + if (_dirread (&d, buf, sizeof (buf))) { /* Allocate memory for the DIR structure returned */ dir = malloc (sizeof (*dir));