Skip to content

Commit

Permalink
Fix wesnoth.put_unit checking wrong arg for location
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Mar 19, 2016
1 parent bce1fae commit 5eb9d80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripting/game_lua_kernel.cpp
Expand Up @@ -2310,9 +2310,9 @@ int game_lua_kernel::intf_put_unit(lua_State *L)
if (!map().on_board(loc)) {
return luaL_argerror(L, 1, "invalid location");
}
} else if (luaW_tolocation(L, 1, loc)) {
} else if (luaW_tolocation(L, 2, loc)) {
if (!map().on_board(loc)) {
return luaL_argerror(L, 1, "invalid location");
return luaL_argerror(L, 2, "invalid location");
}
}

Expand Down

0 comments on commit 5eb9d80

Please sign in to comment.