aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;