forked from github/server
CID 204092: Memory - illegal accesses (NEGATIVE_RETURNS)
This commit is contained in:
parent
96facd21d9
commit
8433052c64
|
@ -531,8 +531,8 @@ static int tolua_unit_setskill(lua_State * L)
|
||||||
bool rcmod = tolua_toboolean(L, 4, 0);
|
bool rcmod = tolua_toboolean(L, 4, 0);
|
||||||
skill_t sk = findskill(skname);
|
skill_t sk = findskill(skname);
|
||||||
|
|
||||||
if (rcmod) level -= u_race(u)->bonus[sk];
|
|
||||||
if (sk != NOSKILL) {
|
if (sk != NOSKILL) {
|
||||||
|
if (rcmod) level -= u_race(u)->bonus[sk];
|
||||||
set_level(u, sk, level);
|
set_level(u, sk, level);
|
||||||
lua_pushinteger(L, level);
|
lua_pushinteger(L, level);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue