DIR* __fastcall__ opendir (register const char* name)
{
- unsigned char buf[32];
+ unsigned char buf[2];
DIR* dir = 0;
DIR d;
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));