From c8a424f3da2b58128e228f7298d7cdf079e5a6ef Mon Sep 17 00:00:00 2001 From: Vishal Uchil Date: Thu, 16 Sep 2021 19:32:47 +0100 Subject: [PATCH] Fix corruption of XLS file in 0.15.2 --- bits/87_read.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits/87_read.js b/bits/87_read.js index 963e9c2..c15b0d7 100644 --- a/bits/87_read.js +++ b/bits/87_read.js @@ -83,7 +83,7 @@ function readSync(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ { } switch((n = firstbyte(d, o))[0]) { case 0xD0: if(n[1] === 0xCF && n[2] === 0x11 && n[3] === 0xE0 && n[4] === 0xA1 && n[5] === 0xB1 && n[6] === 0x1A && n[7] === 0xE1) return read_cfb(CFB.read(d, o), o); break; - case 0x09: if(n[1] <= 0x04) return parse_xlscfb(d, o); break; + case 0x09: if(n[1] <= 0x08) return parse_xlscfb(d, o); break; case 0x3C: return parse_xlml(d, o); case 0x49: if(n[1] === 0x49 && n[2] === 0x2a && n[3] === 0x00) throw new Error("TIFF Image File is not a spreadsheet");