summaryrefslogtreecommitdiff
path: root/src/liolib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/liolib.js')
-rw-r--r--src/liolib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liolib.js b/src/liolib.js
index 3241011..66ef3db 100644
--- a/src/liolib.js
+++ b/src/liolib.js
@@ -74,7 +74,7 @@ const getiofile = function(L, findex) {
lua.lua_getfield(L, lua.LUA_REGISTRYINDEX, findex);
let p = lua.lua_touserdata(L, -1);
if (isclosed(p))
- lauxlib.luaL_error(L, lua.to_luastring("standard %s file is closed"), findex.slice(IOPREF_LEN));
+ lauxlib.luaL_error(L, lua.to_luastring("standard %s file is closed"), findex.subarray(IOPREF_LEN));
return p.f;
};