From d6f38d6cf544ecd739aea98d17ff1b2d3059e075 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 16 Apr 2022 22:46:29 -0700 Subject: [PATCH] More mod cache fixes --- src/pc/mods/mod_cache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pc/mods/mod_cache.c b/src/pc/mods/mod_cache.c index f967e6b8..4c094f9a 100644 --- a/src/pc/mods/mod_cache.c +++ b/src/pc/mods/mod_cache.c @@ -242,14 +242,15 @@ void mod_cache_save(void) { struct ModCacheEntry* node = sModCacheHead; while (node != NULL) { - if (node->path == NULL) { continue; } + if (node->path == NULL) { goto iterate; } u16 pathLen = strlen(node->path); - if (pathLen == 0) { continue; } + if (pathLen == 0) { goto iterate; } fwrite(node->dataHash, sizeof(u8), 16, fp); fwrite(&node->lastLoaded, sizeof(u64), 1, fp); fwrite(&pathLen, sizeof(u16), 1, fp); fwrite(node->path, sizeof(u8), pathLen + 1, fp); +iterate: node = node->next; }