]> git.sur5r.net Git - cc65/blobdiff - libsrc/cbm/opendir.c
Merge remote-tracking branch 'upstream/master'
[cc65] / libsrc / cbm / opendir.c
index c89b3893f22b3ef8aa1f4ded96829cdd85426037..fe7fecb20a942e8fa2ff69c369267e9efef7fa11 100644 (file)
@@ -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));