From fcdef2e51947826bfb1e63e21866640a0e4a0820 Mon Sep 17 00:00:00 2001 From: Dethrace Labs <78985374+dethrace-labs@users.noreply.github.com> Date: Sun, 23 Nov 2025 14:18:04 +1300 Subject: [PATCH] DisposeRaceInfo matching --- src/DETHRACE/common/loading.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/DETHRACE/common/loading.c b/src/DETHRACE/common/loading.c index 548edb42..7e09c3c2 100644 --- a/src/DETHRACE/common/loading.c +++ b/src/DETHRACE/common/loading.c @@ -2791,15 +2791,13 @@ void DisposeRaceInfo(tRace_info* pRace_info) { tText_chunk* the_chunk; if (gNet_mode == eNet_mode_none) { - the_chunk = pRace_info->text_chunks; - for (i = 0; i < pRace_info->text_chunk_count; i++) { + for (j = 0, the_chunk = pRace_info->text_chunks; j < pRace_info->text_chunk_count; j++, the_chunk++) { PossibleService(); - for (j = 0; j < the_chunk->line_count; j++) { - if (the_chunk->text[j]) { - BrMemFree(the_chunk->text[j]); + for (k = 0; k < the_chunk->line_count; k++) { + if (the_chunk->text[k]) { + BrMemFree(the_chunk->text[k]); } } - the_chunk++; } if (pRace_info->text_chunks) { BrMemFree(pRace_info->text_chunks); @@ -2814,8 +2812,8 @@ void DisposeRaceInfo(tRace_info* pRace_info) { if (pRace_info->info_image_data) { BrMemFree(pRace_info->info_image_data); } - for (k = 0; k < pRace_info->number_of_racers; k++) { - UnlockOpponentMugshot(pRace_info->opponent_list[k].index); + for (i = 0; i < pRace_info->number_of_racers; i++) { + UnlockOpponentMugshot(pRace_info->opponent_list[i].index); } PossibleService(); }