Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Revenent opened this issue Sep 30, 2020 · 1 comment

Comments

@Revenent
Copy link

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.

@Revenent
Copy link
Author

Note, REDALERT code base has the same bug.

ChthonVII added a commit to ChthonVII/CnC_Remastered_Collection that referenced this issue Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant