# HG changeset patch # User Pascal Bellard # Date 1592919304 0 # Node ID 53914b720f76b2ccbff831fca3e251c167cda41c # Parent 26195667e7c9ae99306434fd4c46f60e753610c6 linld: fix isoreaddir diff -r 26195667e7c9 -r 53914b720f76 linld/stuff/src/ISO9660.CPP --- a/linld/stuff/src/ISO9660.CPP Tue Jun 23 08:04:01 2020 +0000 +++ b/linld/stuff/src/ISO9660.CPP Tue Jun 23 13:35:04 2020 +0000 @@ -65,6 +65,9 @@ #ifdef __ROCKRIDGE // p += 34 + (p[32] & -2); ? p = x->buffer + 34 + ((p[32] + x->curpos) & -2); +#ifdef ISOHOOK + x->curpos += x->entrysize; +#endif do { register len = p[2]; if (* (short *) p == 0x4D4E) { @@ -73,10 +76,10 @@ goto found; } p += len; -#ifndef ISOHOOK +#ifdef ISOHOOK + } while (x->buffer + x->curpos - 2 > p); +#else } while (x->buffer + x->curpos + x->entrysize - 2 > p); -#else - } while (1); #endif #endif #ifndef ISOHOOK @@ -99,7 +102,9 @@ } #endif found: +#ifndef ISOHOOK x->curpos += x->entrysize; +#endif return 0; } diff -r 26195667e7c9 -r 53914b720f76 linld/stuff/src/ISOCRTL.ASM --- a/linld/stuff/src/ISOCRTL.ASM Tue Jun 23 08:04:01 2020 +0000 +++ b/linld/stuff/src/ISOCRTL.ASM Tue Jun 23 13:35:04 2020 +0000 @@ -52,8 +52,8 @@ stosw mov ax,offset iso_close_hack stosw - mov ax,offset iso_cleanup_hack - stosw +; mov ax,offset iso_cleanup_hack +; stosw global @_cpuhaslm$qv:near @_cpuhaslm$qv: mov ax,[132h] @@ -263,9 +263,10 @@ sbb dx,[(word _isostate.fileofs)+2] ret -iso_cleanup_hack: - mov ah,3Eh ; close file - jmp dosfd +;iso_cleanup_hack: +; mov ah,3Eh ; close file +; jmp dosfd + ifdef NO386 global N_LXLSH@ES:near N_LXLSH@ES: