Skip to content

bugfix(map): Guard the fallback map display name against a missing separator - #3106

Draft
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/map-display-name-separator
Draft

bugfix(map): Guard the fallback map display name against a missing separator#3106
bobtista wants to merge 2 commits into
TheSuperHackers:mainfrom
bobtista:bobtista/bugfix/map-display-name-separator

Conversation

@bobtista

Copy link
Copy Markdown

Both fallback display name sites do fname.reverseFind('\\') + 1. Where '\\' is not the separator that returns null, and nullptr + 1 reaches AsciiString::set:

fname:   /home/user/GeneralsData/Maps/MyMap/MyMap.map
before:  AsciiString::set(nullptr + 1) -> crash
after:   MyMap

Now both sites call a getPathLeaf helper that accepts either separator and returns the whole name when neither is present.

Todo:

  • Scan a user maps folder in which 384 maps take the fallback name path, without crashing
  • Replicate to Generals — N/A, it's in Core

@bobtista bobtista self-assigned this Aug 11, 2026
@bobtista bobtista added the Platform Work towards platform support, such as Linux, MacOS label Aug 11, 2026
@bobtista
bobtista marked this pull request as draft August 11, 2026 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Platform Work towards platform support, such as Linux, MacOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash scanning a map with no map name on non-Windows builds

1 participant