From 53cba4564fba8b5466563f2fcec50d0fab7f39d4 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 8 Apr 2018 01:24:50 +1000 Subject: src/liolib.js: Pass buffer length to fs.writeSync to workaround node 6.11 bug --- src/liolib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2