Draw the editor team selector for MAX_COUNT teams only - #145
Closed
Giszmo wants to merge 1 commit into
Closed
Conversation
Team::MAX_COUNT is 12, but TeamColorSelector::draw still looped to 16. Indexing teams[12..15] is undefined, so GCC at -O3 drops the loop bound entirely and the release build reads past the array until it hits a garbage pointer: Editor, New Map, Ok segfaults. The selector is 6 x 2 cells, which already matches 12.
genixpro
previously approved these changes
Sep 6, 2026
genixpro
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the focused diff and validated it against current master. The combined set applies cleanly after the five already merged fixes and builds successfully on macOS arm64; this PR has green Ubuntu 22.04, Ubuntu 24.04, and Windows CI.
genixpro
dismissed
their stale review
September 6, 2026 01:14
Superseding provisional compile-only approval while behavior-focused testing is completed.
Contributor
|
Current already uses in . The old branch conflicts because the editor was split into the modules. This PR is superseded on current master. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked bugfix from PR #132 (fix/fullscreen-scaling), split out to shrink #132/#129's diff against master per Leo's request.
Team::MAX_COUNT is 12, but TeamColorSelector::draw still looped to 16. Indexing teams[12..15] is undefined behavior.
Original commit: 3f6416b