Closed wisekaa03 closed 2 years ago
Can you share a sample file that hits the error but Excel treats as valid?
We'll accept a PR for the following fix:
diff --git a/bits/45_readfat.js b/bits/45_readfat.js
index b1b4f5d..b72a13c 100644
--- a/bits/45_readfat.js
+++ b/bits/45_readfat.js
@@ -11,7 +11,7 @@ function sleuth_fat(idx/*:number*/, cnt/*:number*/, sectors/*:Array<RawBytes>*/,
if((q = __readInt32LE(sector,i*4)) === ENDOFCHAIN) break;
fat_addrs.push(q);
}
- sleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);
+ if(cnt >= 1) sleuth_fat(__readInt32LE(sector,ssz-4),cnt - 1, sectors, ssz, fat_addrs);
}
}