bugfix(map): Resolve map names that carry either path separator - #3109
Draft
bobtista wants to merge 2 commits into
Draft
bugfix(map): Resolve map names that carry either path separator#3109bobtista wants to merge 2 commits into
bobtista wants to merge 2 commits into
Conversation
bobtista
force-pushed
the
bobtista/bugfix/lan-map-resolution
branch
from
August 27, 2026 16:30
7080bd0 to
27877e2
Compare
bobtista
force-pushed
the
bobtista/bugfix/lan-map-resolution
branch
from
August 28, 2026 07:18
27877e2 to
5a83502
Compare
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.
MapCache::findMaplowercased the name and then did an exact match against the cache key, so a namethat carried the other path separator never resolved. The map cache keys are built with the platform
separator, while a name can reach the lookup from somewhere that stored the other one, such as a LAN
preference written by a build on a different platform. The lookup silently returns null and the
caller treats the map as absent.
LanGameOptionsMenuInithit exactly that. It looked the host's preferred map up with a raw lowercasedTheMapCache->find, and on a miss the host slot is never marked as having the map and the map CRC andsize are never set.
Now
findMapconverts the name's separators to the platform one before matching, so either formresolves to the same entry. The menu also resolves through
findMapand sets the canonicalm_fileNameon the game rather than the raw preference string, which keeps one lookup instead of two.Reproduction:
/where the map cache key uses\, or thereverse. A preference carried over from a build on the other platform does this.
Measured by taking a real cache key, flipping every separator in it, and resolving both forms through
findMapagainst the same cache:...\maps\(3 letter names required)\...).../maps/(3 letter names required)/...)The native form is the control, so a pass is distinguishable from "the cache was empty".
Todo: