More fixes
This commit is contained in:
parent
c5c11a5a40
commit
bf3c3bdccc
|
@ -135,6 +135,7 @@ void mod_cache_save(void) {
|
|||
FILE* fp = fopen(filename, "wb");
|
||||
if (fp == NULL) {
|
||||
LOG_ERROR("Failed to open mod cache save fp: %s", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
u16 version = MOD_CACHE_VERSION;
|
||||
|
@ -143,7 +144,7 @@ void mod_cache_save(void) {
|
|||
struct ModCacheEntry* node = sModCacheHead;
|
||||
while (node != NULL) {
|
||||
fwrite(node->dataHash, sizeof(u8), 16, fp);
|
||||
fwrite(node->lastLoaded, sizeof(u64), 1, fp);
|
||||
fwrite(&node->lastLoaded, sizeof(u64), 1, fp);
|
||||
u16 pathLen = strlen(node->path);
|
||||
fwrite(&pathLen, sizeof(u16), 1, fp);
|
||||
fwrite(node->path, sizeof(u8), pathLen + 1, fp);
|
||||
|
|
|
@ -61,7 +61,7 @@ static void mark_groups_loaded_from_hash(void) {
|
|||
if (mod->loadedFromCache) {
|
||||
// if we loaded from cache, mark bytes as downloaded
|
||||
sTotalDownloadBytes += mod->size;
|
||||
LOG_INFO("Loaded from cache: %s, %llu", mod->name, mod->size);
|
||||
LOG_INFO("Loaded from cache: %s, %llu", mod->name, (u64)mod->size);
|
||||
} else {
|
||||
// if we haven't loaded from cache, we need this offset group
|
||||
u64 ogIndexStart = fileStartOffset / GROUP_SIZE;
|
||||
|
|
Loading…
Reference in New Issue