electronicarts/CnC_Remastered_Collection

Sidebar code has off-by-1 error can cause game to crash if too many items are added to the sidebar.

Revenent opened this issue · 1 comments

if (BuildableCount <= MAX_BUILDABLES) {

if (BuildableCount <= MAX_BUILDABLES) {

Both use "BuildableCount <= MAX_BUILDABLES", instead of "BuildableCount < MAX_BUILDABLES".

Not a major bug, since the game normally doesn't allow (even with capturing) that many item types to be added. But mods that add new unit types, or mods that allow all unit types can and probably will hit this limit.

Note, REDALERT code base has the same bug.