mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
More mod cache fixes
This commit is contained in:
parent
1576d92734
commit
ef5d1b222b
1 changed files with 3 additions and 2 deletions
|
|
@ -242,14 +242,15 @@ void mod_cache_save(void) {
|
||||||
|
|
||||||
struct ModCacheEntry* node = sModCacheHead;
|
struct ModCacheEntry* node = sModCacheHead;
|
||||||
while (node != NULL) {
|
while (node != NULL) {
|
||||||
if (node->path == NULL) { continue; }
|
if (node->path == NULL) { goto iterate; }
|
||||||
u16 pathLen = strlen(node->path);
|
u16 pathLen = strlen(node->path);
|
||||||
if (pathLen == 0) { continue; }
|
if (pathLen == 0) { goto iterate; }
|
||||||
|
|
||||||
fwrite(node->dataHash, sizeof(u8), 16, fp);
|
fwrite(node->dataHash, sizeof(u8), 16, fp);
|
||||||
fwrite(&node->lastLoaded, sizeof(u64), 1, fp);
|
fwrite(&node->lastLoaded, sizeof(u64), 1, fp);
|
||||||
fwrite(&pathLen, sizeof(u16), 1, fp);
|
fwrite(&pathLen, sizeof(u16), 1, fp);
|
||||||
fwrite(node->path, sizeof(u8), pathLen + 1, fp);
|
fwrite(node->path, sizeof(u8), pathLen + 1, fp);
|
||||||
|
iterate:
|
||||||
node = node->next;
|
node = node->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue