diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-19 17:46:17 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-04-19 18:09:14 +1000 |
commit | 4105fee42aa927c4da8ddd7b2e51b9f55202ddeb (patch) | |
tree | 7f5e2dfe21c56d63d6d815214543117d897b6261 | |
parent | 006badf9d13971010384340ff786c1cd62c268f6 (diff) | |
download | fengari-4105fee42aa927c4da8ddd7b2e51b9f55202ddeb.tar.gz fengari-4105fee42aa927c4da8ddd7b2e51b9f55202ddeb.tar.bz2 fengari-4105fee42aa927c4da8ddd7b2e51b9f55202ddeb.zip |
lua-cli: Pass null to luaL_loadfile for stdin
-rwxr-xr-x | tests/manual-tests/lua-cli.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/manual-tests/lua-cli.js b/tests/manual-tests/lua-cli.js index 5bbf5cd..f11e833 100755 --- a/tests/manual-tests/lua-cli.js +++ b/tests/manual-tests/lua-cli.js @@ -208,8 +208,10 @@ const handle_script = function(L, argv) { let fname = argv[0]; let status; if (fname === "-" && argv[-1] !== "--") - fname = void 0; /* stdin */ - status = lauxlib.luaL_loadfile(L, lua.to_luastring(fname)); + fname = null; /* stdin */ + else + fname = lua.to_luastring(fname); + status = lauxlib.luaL_loadfile(L, fname); if (status === lua.thread_status.LUA_OK) { let n = pushargs(L); /* push arguments to script */ status = docall(L, n, lua.LUA_MULTRET); |