From 941cf65227eb780229f1ffd1e039c8fb18b3149d Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 13 Sep 2022 21:12:03 -0400 Subject: [PATCH] use strnlen for c string empty check (#1352) * use strcmp for c string compare * Update z_file_choose.c Co-authored-by: briaguya --- soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 75cc7ca27..9a54ec350 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -365,7 +365,7 @@ void DrawSeedHashSprites(FileChooseContext* this) { gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, this->fileButtonAlpha[this->buttonIndex]); - if (CVar_GetS32("gRandomizer", 0) != 0 && CVar_GetString("gSpoilerLog", "") != "") { + if (CVar_GetS32("gRandomizer", 0) && strnlen(CVar_GetString("gSpoilerLog", ""), 1) != 0) { u16 xStart = 64; for (u8 i = 0; i < 5; i++) { SpriteLoad(this, GetSeedTexture(gSaveContext.seedIcons[i]));