Duke3D: improve how labels are loaded into memory and introduce MAXLABELS limit
Previous to this commit, the game would hijack the sprite, wall and sector arrays to store the label data temporarily, which would get copied into freshly allocated arrays once the scripts were fully parsed. This lead to the maximum number of labels depending on MAXSPRITES. This coupling is now removed, and an independent limit MAXLABELS has been introduced, which is currently set to 16384. Additionally, the limit is now checked before character data is loaded into memory, rather than afterwards, preventing out of bounds accesses.
Showing
Please register or sign in to comment