diff options
Diffstat (limited to 'src/union_room_chat_objects.c')
-rw-r--r-- | src/union_room_chat_objects.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/union_room_chat_objects.c b/src/union_room_chat_objects.c index e5b739675..f97136a0a 100644 --- a/src/union_room_chat_objects.c +++ b/src/union_room_chat_objects.c @@ -162,13 +162,13 @@ static const struct SpriteTemplate sSpriteTemplate_UnionRoomChatIcons = { bool32 UnionRoomChat_TryAllocSpriteWork(void) { - u32 i; - for (i = 0; i < 5; i++) + int i; + for (i = 0; i < NELEMS(sSpriteSheets); i++) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalette(&sSpritePalette); - sWork = Alloc(0x18); - if (!sWork) + sWork = Alloc(sizeof(struct UnionRoomChat3)); + if (sWork == NULL) return FALSE; return TRUE; @@ -176,7 +176,7 @@ bool32 UnionRoomChat_TryAllocSpriteWork(void) void UnionRoomChat_FreeSpriteWork(void) { - if (sWork) + if (sWork != NULL) Free(sWork); } |