Fix memory corruption in download
This commit is contained in:
parent
f8b8e80cf6
commit
1441c7e137
|
@ -68,9 +68,11 @@ static void mark_groups_loaded_from_hash(void) {
|
||||||
u64 ogIndexStart = fileStartOffset / GROUP_SIZE;
|
u64 ogIndexStart = fileStartOffset / GROUP_SIZE;
|
||||||
u64 ogIndexEnd = (fileStartOffset + mod->size) / GROUP_SIZE;
|
u64 ogIndexEnd = (fileStartOffset + mod->size) / GROUP_SIZE;
|
||||||
do {
|
do {
|
||||||
LOG_INFO("Marking group as required: %llu (%s)", ogIndexStart, file->relativePath);
|
if (ogIndexStart < sOffsetGroupCount) {
|
||||||
offsetGroupRequired[ogIndexStart] = 1;
|
LOG_INFO("Marking group as required: %llu (%s)", ogIndexStart, file->relativePath);
|
||||||
ogIndexStart++;
|
offsetGroupRequired[ogIndexStart] = 1;
|
||||||
|
ogIndexStart++;
|
||||||
|
}
|
||||||
} while (ogIndexStart <= ogIndexEnd);
|
} while (ogIndexStart <= ogIndexEnd);
|
||||||
}
|
}
|
||||||
fileStartOffset += file->size;
|
fileStartOffset += file->size;
|
||||||
|
|
Loading…
Reference in New Issue