Fix range print for getter error (setter was caught ahead of time)
This commit is contained in:
parent
4e256b73b2
commit
b746ef66ac
|
@ -1043,7 +1043,7 @@ static int lib_getluabanks(lua_State *L)
|
||||||
return luaL_error(L, "luabanks[] invalid index");
|
return luaL_error(L, "luabanks[] invalid index");
|
||||||
|
|
||||||
if (i >= NUM_LUABANKS)
|
if (i >= NUM_LUABANKS)
|
||||||
luaL_error(L, "luabanks[] index %d out of range (%d - %d)", i, 0, NUM_LUABANKS);
|
luaL_error(L, "luabanks[] index %d out of range (%d - %d)", i, 0, NUM_LUABANKS-1);
|
||||||
|
|
||||||
lua_pushinteger(L, luabanks[i]);
|
lua_pushinteger(L, luabanks[i]);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue