• src/doors/syncduke/Game/src/game.c premap.c src/doors/syncduke/syncduk

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sun Jul 5 03:53:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/a55fa5877a42f6b3c5067d35
    Modified Files:
    src/doors/syncduke/Game/src/game.c premap.c src/doors/syncduke/syncduke_door.c
    Log Message:
    syncduke: make -map (third-party user maps) actually work

    Three defects each independently broke playing a user map, all found smoke-testing Pascal Rouaud's "Roch" against the Atomic GRP:

    - The engine's -map handler consumed only the flag, not its value, so
    the map PATH was re-parsed on the next pass of the argument loop. A
    DOS-style relative name fell through harmlessly (all -map ever worked
    with); a Unix absolute path parsed as a "/option" and dumped the
    command-line help, exiting the door.

    - The door's argv sanitizer didn't strip -log/-eventlog, leaking their
    absolute-path values into that same DOS-era parser. The stock install
    only survived by luck: "/sbbs/..." happens to parse as option 's'
    (skill). Both are door-consumed flags; strip them like -home/-grpdir.

    - premap built the usermap candidate as "<gamedir>\<file>" even with an
    EMPTY game dir, yielding "\<path>". SafeFileExists() normalizes the
    backslash and reported it present, but loadboard()'s open does not --
    so the load failed and the sane bare-path fallback never ran: every
    user map ended in "User Map x not found!". Only prepend the game dir
    when there is one.

    Also record gameexit()'s reason in the door debug log: engine errors
    ("User Map x not found!", CON errors, ...) otherwise only flash on the
    closing screen, invisible after the fact.

    Validated headless (frame captures show Roch rendering in-game) and
    live through the lobby.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net