Fix graphics function crash
This commit is contained in:
parent
f641fca065
commit
7e3c73f66f
@ -805,16 +805,16 @@ int luacon_graphics_update(int t, int i, int *pixel_mode, int *cola, int *colr,
|
|||||||
lua_pushinteger(l, *colb);
|
lua_pushinteger(l, *colb);
|
||||||
lua_pcall(l, 4, 10, 0);
|
lua_pcall(l, 4, 10, 0);
|
||||||
|
|
||||||
cache = luaL_optint(l, 2, 0);
|
cache = luaL_optint(l, -10, 0);
|
||||||
*pixel_mode = luaL_optint(l, 3, *pixel_mode);
|
*pixel_mode = luaL_optint(l, -9, *pixel_mode);
|
||||||
*cola = luaL_optint(l, 4, *cola);
|
*cola = luaL_optint(l, -8, *cola);
|
||||||
*colr = luaL_optint(l, 5, *colr);
|
*colr = luaL_optint(l, -7, *colr);
|
||||||
*colg = luaL_optint(l, 6, *colg);
|
*colg = luaL_optint(l, -6, *colg);
|
||||||
*colb = luaL_optint(l, 7, *colb);
|
*colb = luaL_optint(l, -5, *colb);
|
||||||
*firea = luaL_optint(l, 8, *firea);
|
*firea = luaL_optint(l, -4, *firea);
|
||||||
*firer = luaL_optint(l, 9, *firer);
|
*firer = luaL_optint(l, -3, *firer);
|
||||||
*fireg = luaL_optint(l, 10, *fireg);
|
*fireg = luaL_optint(l, -2, *fireg);
|
||||||
*fireb = luaL_optint(l, 11, *fireb);
|
*fireb = luaL_optint(l, -1, *fireb);
|
||||||
lua_pop(l, 10);
|
lua_pop(l, 10);
|
||||||
return cache;
|
return cache;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user