diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 10:30:08 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 10:30:08 +0100 |
commit | 39f700a6c26bada413c194cb1242d7dd01e963e5 (patch) | |
tree | 18da570bf5728e4cd30e8c6a5b3b3c6de0a35ed9 /src | |
parent | f2250406ab210d71ca8ae71db93facc34f3c9992 (diff) | |
download | fengari-39f700a6c26bada413c194cb1242d7dd01e963e5.tar.gz fengari-39f700a6c26bada413c194cb1242d7dd01e963e5.tar.bz2 fengari-39f700a6c26bada413c194cb1242d7dd01e963e5.zip |
When reading file, truncate not full buffer
Diffstat (limited to 'src')
-rw-r--r-- | src/lauxlib.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js index c2852ac..1b306a3 100644 --- a/src/lauxlib.js +++ b/src/lauxlib.js @@ -437,7 +437,7 @@ if (typeof require === "function") { lf.pos += bytes; } if (bytes > 0) - return lf.binary ? toDataView(lf.buff) : new lobject.TValue(0, lf.buff).jsstring(); // TODO: Here reading utf8 only + return lf.binary ? toDataView(lf.buff) : new lobject.TValue(0, lf.buff).jsstring(0, bytes); // TODO: Here reading utf8 only else return null; }; |