Fix nk_love_tree_state_push by making the image argument optional

This commit is contained in:
Kevin Harrison 2018-12-18 13:41:41 -05:00 committed by GitHub
parent 42ca8ed3c0
commit 75da1af2b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2420,7 +2420,7 @@ static int nk_love_tree_state_push(lua_State *L)
const char *title = luaL_checkstring(L, 3);
struct nk_image image;
int use_image = 0;
if (argc >= 3 && !lua_isnil(L, 4)) {
if (argc >= 4 && !lua_isnil(L, 4)) {
nk_love_checkImage(4, &image);
use_image = 1;
}