Skip to content

Commit e59230c

Browse files
committed
Fix spr(), #4
1 parent e8b9902 commit e59230c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ static int pico8_spr(lua_State* L)
689689
uint8_t n = fix32_to_uint8(luaL_checkunsigned(L, 1));
690690
int32_t x = fix32_to_int32(luaL_optunsigned(L, 2, 0));
691691
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);
692+
uint8_t w = fix32_to_uint8(luaL_optunsigned(L, 4, fix32_value(1, 0)));
693+
uint8_t h = fix32_to_uint8(luaL_optunsigned(L, 5, fix32_value(1, 0)));
694694
bool flip_x = lua_toboolean(L, 6);
695695
bool flip_y = lua_toboolean(L, 7);
696696

0 commit comments

Comments
 (0)