Fix memory corruption in download

This commit is contained in:
MysterD 2022-04-23 15:08:33 -07:00
parent 55ed56b7f4
commit 2827c523ce
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;