mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Rollover protection for unloaded mapheader record tracking system
You will run into memory limits before this happens, but... if you have major quantities of unloaded mapheader record data, avoid a rollover in the counter of records to write.
This commit is contained in:
parent
28677da5b9
commit
3027d254fe
1 changed files with 6 additions and 1 deletions
|
|
@ -5141,7 +5141,12 @@ void G_SaveGameData(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
numgamedatamapheaders++;
|
// It's far off on the horizon, beyond many memory limits, but prevent a potential misery moment of losing ALL your data.
|
||||||
|
if (++numgamedatamapheaders == UINT32_MAX)
|
||||||
|
{
|
||||||
|
CONS_Alert(CONS_WARNING, "Some unloaded map record data has been dropped due to datatype limitations.\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
length += 4 + (numgamedatamapheaders * (MAXMAPLUMPNAME+1+4+4));
|
length += 4 + (numgamedatamapheaders * (MAXMAPLUMPNAME+1+4+4));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue