aboutsummaryrefslogtreecommitdiff
path: root/src/loslib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-29 09:20:03 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-29 09:20:03 +0200
commitcc54d51321b789ee8a7a0fb5c209f6006194582c (patch)
tree248627aa74cb1ec4f03d61306ddfd7f6e484b18e /src/loslib.js
parent2e8de4113771b717f529b0a21f8a39f4ea60799a (diff)
parenta0acc63c7d0171f1b45bebf9d74744515f9217c7 (diff)
downloadfengari-cc54d51321b789ee8a7a0fb5c209f6006194582c.tar.gz
fengari-cc54d51321b789ee8a7a0fb5c209f6006194582c.tar.bz2
fengari-cc54d51321b789ee8a7a0fb5c209f6006194582c.zip
Merge branch 'master' of https://github.com/fengari-lua/fengari
Diffstat (limited to 'src/loslib.js')
-rw-r--r--src/loslib.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loslib.js b/src/loslib.js
index 976ab92..baaee74 100644
--- a/src/loslib.js
+++ b/src/loslib.js
@@ -44,14 +44,14 @@ const getfield = function(L, key, d, delta) {
let res = lua.lua_tointegerx(L, -1);
if (res === false) { /* field is not an integer? */
if (t !== lua.LUA_TNIL) /* some other value? */
- return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' is not an integer`), true);
+ return lauxlib.luaL_error(L, lua.to_luastring("field '%s' is not an integer"), key);
else if (d < 0) /* absent field; no default? */
- return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' missing in date table`), true);
+ return lauxlib.luaL_error(L, lua.to_luastring("field '%s' missing in date table"), key);
res = d;
}
else {
if (!(-L_MAXDATEFIELD <= res && res <= L_MAXDATEFIELD))
- return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' is out-of-bound`), true);
+ return lauxlib.luaL_error(L, lua.to_luastring("field '%s' is out-of-bound"), key);
res -= delta;
}
lua.lua_pop(L, 1);