diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp index bf2bb9137..d24d070ca 100644 --- a/src/script/lua_api/l_util.cpp +++ b/src/script/lua_api/l_util.cpp @@ -166,8 +166,8 @@ int ModApiUtil::l_get_tool_wear_after_use(lua_State *L) NO_MAP_LOCK_REQUIRED; u32 uses = readParam(L, 1); u16 initial_wear = readParam(L, 2, 0); - u16 wear = calculateResultWear(uses, initial_wear); - lua_pushnumber(L, wear); + u32 add_wear = calculateResultWear(uses, initial_wear); + lua_pushnumber(L, add_wear); return 1; }