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

Fix a crash in the units view #2416

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

lmoureaux
Copy link
Contributor

The units view was crashing when more than 250 units were on UWT. This was reported by @Corbeau-1 on Discord (Sim06).

The second commit isn't strictly necessary but keeps things consistent.

@lmoureaux lmoureaux requested review from blabber and jwrober October 25, 2024 20:34
The Units view (F2) was crashing when there were more than MAX_NUM_UNITS
(=250) units under UWT. This was the consequence of using a fixed-size
array. Fix by switching to std::vector.

Reported by Corbeau.
This keeps the interface consistent with get_units_waiting_data() and is
generally safer.
@lmoureaux lmoureaux force-pushed the bugfix/unit-view-crash branch from 483acd3 to 8a6dc92 Compare October 25, 2024 20:42
Copy link
Collaborator

@blabber blabber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I can't reproduce the bug this is fixing, but I did a quick regression test. In my local game the units report, and especially the UWT table, works as expected.

@jwrober jwrober merged commit d913eb5 into longturn:master Oct 28, 2024
22 checks passed
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

Successfully merging this pull request may close these issues.

3 participants