• src/doors/clans-src/src/video.c

    From Deucе@VERT to Git commit to main/sbbs/master on Friday, March 13, 2026 14:48:42
    https://gitlab.synchro.net/main/sbbs/-/commit/144dbf301064f1039b506c49
    Modified Files:
    src/doors/clans-src/src/video.c
    Log Message:
    Fix Windows ScrollUp crash: correct SMALL_RECT off-by-one errors

    SMALL_RECT coordinates are inclusive on all sides. dwSize.X and dwSize.Y
    return buffer dimensions, but must be decremented to get the last valid
    index when used as rectangle bounds.

    Fixed in three functions:
    - ScrollUp(): scroll_rect.Right (line 183)
    - save_screen(): rect_rw.Right and rect_rw.Bottom (lines 1285-1286)
    - restore_screen(): rect_write.Right and rect_write.Bottom (lines 1312-1313)

    Also fixed ClearArea() Windows implementation (lines 890-899):
    - COORD pos struct was missing .Y initialization
    - pos.Y was never updated in the loop, causing all FillConsoleOutput*
    calls to target the same garbage Y coordinate
    - Now initializes .Y and updates it each iteration

    This resolves crashes in ScrollConsoleScreenBuffer, ReadConsoleOutput, WriteConsoleOutput, and FillConsoleOutputCharacter on Windows.

    Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

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