• src/encode/hex.c hex.h

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Tue Nov 24 13:09:38 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/16e0cce5db7a2245587705e4
    Modified Files:
    src/encode/hex.c hex.h
    Log Message:
    encode: fix hex_encode() output for low/high bytes and short results

    hex_encode() formatted escapes with "%2X" (a space in place of a
    leading zero) from a plain char (bytes 0x80 and up printed as
    FFFFFFxx, overrunning the 3 characters reserved), terminated the
    buffer at its end rather than after the output (a short result was
    left unterminated over whatever the buffer held), and copied a
    character unescaped when the buffer had no room for its escape.
    It now writes %02X from the unsigned byte, terminates the output,
    and stops when an escape won't fit. 'chars' is now const, so C++
    callers can pass a string literal.

    Nothing called it yet; the Extended File Info module (#1421) will.

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

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