use strnlen for c string empty check (#1352)

* use strcmp for c string compare

* Update z_file_choose.c

Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
briaguya 2022-09-13 21:12:03 -04:00 committed by GitHub
parent e1f95a5ad9
commit 941cf65227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ void DrawSeedHashSprites(FileChooseContext* this) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, this->fileButtonAlpha[this->buttonIndex]); 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; u16 xStart = 64;
for (u8 i = 0; i < 5; i++) { for (u8 i = 0; i < 5; i++) {
SpriteLoad(this, GetSeedTexture(gSaveContext.seedIcons[i])); SpriteLoad(this, GetSeedTexture(gSaveContext.seedIcons[i]));