diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-17 10:34:43 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann@users.noreply.github.com> | 2017-03-17 10:36:57 +0100 |
commit | 0d8de3dad35216726d6f2e0b5fe333b2b7aa6d10 (patch) | |
tree | 2628ccf96713956ebf304b6443f7d39d3fa29034 /src/ldump.js | |
parent | 18631188532881934261e72321d9839ad42d1b06 (diff) | |
download | fengari-0d8de3dad35216726d6f2e0b5fe333b2b7aa6d10.tar.gz fengari-0d8de3dad35216726d6f2e0b5fe333b2b7aa6d10.tar.bz2 fengari-0d8de3dad35216726d6f2e0b5fe333b2b7aa6d10.zip |
Fixed bad string length undump
Diffstat (limited to 'src/ldump.js')
-rw-r--r-- | src/ldump.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ldump.js b/src/ldump.js index dd8eb29..98c48ef 100644 --- a/src/ldump.js +++ b/src/ldump.js @@ -76,7 +76,7 @@ const DumpString = function(s, D) { DumpByte(size, D); else { DumpByte(0xFF, D); - DumpInt(size, D); + DumpInteger(size, D); } DumpBlock(str, size - 1, D); /* no need to save '\0' */ } @@ -135,7 +135,8 @@ const DumpUpvalues = function(f, D) { const DumpDebug = function(f, D) { let n = D.strip ? 0 : f.lineinfo.length; DumpInt(n, D); - DumpBlock(f.lineinfo, n, D); + for (let i = 0; i < n; i++) + DumpInt(f.lineinfo[i], D); n = D.strip ? 0 : f.locvars.length; DumpInt(n, D); for (let i = 0; i < n; i++) { |