summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-04-08 01:24:50 +1000
committerdaurnimator <quae@daurnimator.com>2018-04-08 01:24:50 +1000
commit53cba4564fba8b5466563f2fcec50d0fab7f39d4 (patch)
tree01cb4fe9c06eca3f993da5059b86302a2cce37c1 /src
parent87e38b8ae8d98064e5013ba5e9e73e035046c841 (diff)
downloadfengari-53cba4564fba8b5466563f2fcec50d0fab7f39d4.tar.gz
fengari-53cba4564fba8b5466563f2fcec50d0fab7f39d4.tar.bz2
fengari-53cba4564fba8b5466563f2fcec50d0fab7f39d4.zip
src/liolib.js: Pass buffer length to fs.writeSync to workaround node 6.11 bug
Diffstat (limited to 'src')
-rw-r--r--src/liolib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liolib.js b/src/liolib.js
index 7f0fff0..92dda58 100644
--- a/src/liolib.js
+++ b/src/liolib.js
@@ -142,7 +142,7 @@ const g_write = function(L, f, arg) {
for (; nargs--; arg++) {
let s = luaL_checklstring(L, arg);
try {
- status = status && (fs.writeSync(f.fd, prepare_string_for_write(s)) === s.length);
+ status = status && (fs.writeSync(f.fd, prepare_string_for_write(s), 0, s.length) === s.length);
} catch (e) {
status = false;
err = e;