mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 15:46:57 +00:00
Fix a goto jumping past va_end
Found by coverity
This commit is contained in:
parent
e76a18d0f2
commit
8748b68b87
@ -372,13 +372,14 @@ bool luaW_getglobal(lua_State *L, ...)
|
||||
lua_rawget(L, -2);
|
||||
lua_remove(L, -2);
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
if (lua_isnil(L, -1)) {
|
||||
discard:
|
||||
va_end(ap);
|
||||
lua_pop(L, 1);
|
||||
return false;
|
||||
}
|
||||
va_end(ap);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user