Skip to content

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

Description

@bobtista

Prerequisites

  • I have searched for similar issues and confirmed this is not a duplicate

Game Version

  • Command & Conquer Generals
  • Command & Conquer Generals: Zero Hour

Bug Description

On non-Windows builds the game crashes while building the map cache, on the first map whose world dictionary has no map name.

Reproduction Steps

  1. Place a map with no map name in its world dictionary into the user maps directory on a non-Windows build.
  2. Start the game so the map cache scans the directory.
  3. Observe the crash while the cache is being built.

Additional Context

The fallback that derives a display name searches the file name for the Windows separator and adds one to the result without checking it, so on other platforms a null pointer reaches AsciiString::set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions