Fix memory corruption in download

This commit is contained in:
MysterD 2022-04-23 15:08:33 -07:00
parent f8b8e80cf6
commit 1441c7e137
1 changed files with 5 additions and 3 deletions

View File

@ -68,9 +68,11 @@ static void mark_groups_loaded_from_hash(void) {
u64 ogIndexStart = fileStartOffset / GROUP_SIZE;
u64 ogIndexEnd = (fileStartOffset + mod->size) / GROUP_SIZE;
do {
if (ogIndexStart < sOffsetGroupCount) {
LOG_INFO("Marking group as required: %llu (%s)", ogIndexStart, file->relativePath);
offsetGroupRequired[ogIndexStart] = 1;
ogIndexStart++;
}
} while (ogIndexStart <= ogIndexEnd);
}
fileStartOffset += file->size;