Skip to content

Commit

Permalink
No need to check arguments length here since lua_isnumber will return
Browse files Browse the repository at this point in the history
false anyways when the argument isn't present.
  • Loading branch information
saurtron committed Dec 20, 2024
1 parent e6f2bd9 commit b84bcad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rts/Lua/LuaUnsyncedCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,7 @@ int LuaUnsyncedCtrl::ShareResources(lua_State* L)
return 0;
}

if ((args < 3) || !lua_isnumber(L, 3))
if (!lua_isnumber(L, 3))
luaL_error(L, "Incorrect third argument to ShareResources() for the specified resource");

if (type[0] == 'm') {
Expand Down

0 comments on commit b84bcad

Please sign in to comment.