Skip to content

Commit

Permalink
Fixed #370
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 authored Sep 11, 2024
1 parent 0c78354 commit fbf8677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/peripheral/chest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int chest::setItem(lua_State *L) {
if (!lua_isstring(L, -1)) luaL_error(L, "bad field 'name' (expected string, got %s)", lua_typename(L, lua_type(L, -1)));
lua_pop(L, 1);
lua_getfield(L, 2, "count");
if (!lua_isnumber(L, -1)) luaL_error(L, "bad field 'name' (expected string, got %s)", lua_typename(L, lua_type(L, -1)));
if (!lua_isnumber(L, -1)) luaL_error(L, "bad field 'count' (expected number, got %s)", lua_typename(L, lua_type(L, -1)));
int count = lua_tointeger(L, -1);
lua_settop(L, 2);
lua_pushinteger(L, addItems(L, slot, count));
Expand Down

0 comments on commit fbf8677

Please sign in to comment.