beyond-all-reason / beyond-all-reason/RecoilEngine
`/give feature` disobeys limit
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
### Description
Feature limit defined [here](https://github.com/beyond-all-reason/spring/blob/2c9b69369e20d34ba8f089c0df4a886811e4c5cd/rts/Sim/Misc/GlobalConstants.h#L98) is not obeyed.
If you place 32175 features, the game crashes

[Video of the crash](https://cdn.discordapp.com/attachments/724924957074915358/1219345158345199698/Spring_2024.03.18_-_18.00.36.38.mp4?ex=660af6ac&is=65f881ac&hm=0c0dca4e74c84f39391e787c77ad4245d39ef83fc22baf210dd2e6551482aa8d&)
[Video of crash embeded in discord in #engine channel](https://discord.com/channels/549281623154229250/724924957074915358/1219345159721062440)
### Expected Behaviour
Engine does should not allow you to place more than 32000 features
### Actual Behaviour
You can place 32174 features, the 32175th feature crashes the engine
### Reproduction steps
Load full metal plate
/cheat
/give 15999 rocks30_def_01
/give 15999 rocks30_def_01
/give 176 rocks30_def_01
/give 1 rocks30_def_01 > Crash
### Other
_No response_
Contributor guide
Research direction
Start with the feature limit in rts/Sim/Misc/GlobalConstants.h, then trace the /give command handling that creates features. Reproduce the issue with the listed /give commands and verify that attempts beyond 32000 are rejected without crashing the engine.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100