We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8b9902 commit e59230cCopy full SHA for e59230c
src/api.c
@@ -689,8 +689,8 @@ static int pico8_spr(lua_State* L)
689
uint8_t n = fix32_to_uint8(luaL_checkunsigned(L, 1));
690
int32_t x = fix32_to_int32(luaL_optunsigned(L, 2, 0));
691
int32_t y = fix32_to_int32(luaL_optunsigned(L, 3, 0));
692
- uint8_t w = luaL_optunsigned(L, 4, 1);
693
- uint8_t h = luaL_optunsigned(L, 5, 1);
+ uint8_t w = fix32_to_uint8(luaL_optunsigned(L, 4, fix32_value(1, 0)));
+ uint8_t h = fix32_to_uint8(luaL_optunsigned(L, 5, fix32_value(1, 0)));
694
bool flip_x = lua_toboolean(L, 6);
695
bool flip_y = lua_toboolean(L, 7);
696
0 commit comments