From 37753d82302f10130edb476147037df908b342a5 Mon Sep 17 00:00:00 2001 From: SheetJS Date: Tue, 31 Dec 2013 11:42:46 -0500 Subject: [PATCH] version bump 0.3.6: updating SSF Addresses issue from LO Calc files generating invalid formats. Link: https://github.com/SheetJS/js-xls/issues/24 --- bits/10_ssf.js | 2 +- package.json | 2 +- tests/files | 2 +- xlsx.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bits/10_ssf.js b/bits/10_ssf.js index 1ec83f1..a07e438 100644 --- a/bits/10_ssf.js +++ b/bits/10_ssf.js @@ -260,7 +260,7 @@ function eval_fmt(fmt, v, opts, flen) { while(i < fmt.length) { switch((c = fmt[i])) { case '"': /* Literal text */ - for(o="";fmt[++i] !== '"';) o += fmt[i]; + for(o="";fmt[++i] !== '"' && i < fmt.length;) o += fmt[i]; out.push({t:'t', v:o}); ++i; break; case '\\': var w = fmt[++i], t = "()".indexOf(w) === -1 ? 't' : w; out.push({t:t, v:w}); ++i; break; diff --git a/package.json b/package.json index 64050d8..6bd5429 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xlsx", - "version": "0.3.5", + "version": "0.3.6", "author": "sheetjs", "description": "(one day) a full-featured XLSX parser and writer. For now, primitive parser", "keywords": [ "xlsx", "office", "excel", "spreadsheet" ], diff --git a/tests/files b/tests/files index a6b967b..9c0f02f 160000 --- a/tests/files +++ b/tests/files @@ -1 +1 @@ -Subproject commit a6b967bb3df19fbced91c1124c759e7deb152513 +Subproject commit 9c0f02fe3a2c682ec5b1a2285b9f976902284b87 diff --git a/xlsx.js b/xlsx.js index 1f727bc..3b2a05d 100644 --- a/xlsx.js +++ b/xlsx.js @@ -263,7 +263,7 @@ function eval_fmt(fmt, v, opts, flen) { while(i < fmt.length) { switch((c = fmt[i])) { case '"': /* Literal text */ - for(o="";fmt[++i] !== '"';) o += fmt[i]; + for(o="";fmt[++i] !== '"' && i < fmt.length;) o += fmt[i]; out.push({t:'t', v:o}); ++i; break; case '\\': var w = fmt[++i], t = "()".indexOf(w) === -1 ? 't' : w; out.push({t:t, v:w}); ++i; break;