Fix a goto jumping past va_end

Found by coverity
This commit is contained in:
Alexander van Gessel 2013-12-12 20:33:13 +01:00
parent e76a18d0f2
commit 8748b68b87

View File

@ -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;
}