summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-24 10:30:08 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-03-24 10:30:08 +0100
commit39f700a6c26bada413c194cb1242d7dd01e963e5 (patch)
tree18da570bf5728e4cd30e8c6a5b3b3c6de0a35ed9 /src/lauxlib.js
parentf2250406ab210d71ca8ae71db93facc34f3c9992 (diff)
downloadfengari-39f700a6c26bada413c194cb1242d7dd01e963e5.tar.gz
fengari-39f700a6c26bada413c194cb1242d7dd01e963e5.tar.bz2
fengari-39f700a6c26bada413c194cb1242d7dd01e963e5.zip
When reading file, truncate not full buffer
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js2
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;
};