• src/xpdev/ini_file.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Wednesday, August 05, 2026 14:31:49
    https://gitlab.synchro.net/main/sbbs/-/commit/779ffcb9f99c7bbe81f3b00e
    Modified Files:
    src/xpdev/ini_file.c
    Log Message:
    Work around non-standard bsearch() declarations

    It's been reported that some platforms declare the first argument
    to bsearch() as nonnull. This means a compiler could potentially
    skip code if it knows a NULL is being passed, and less theoretically
    triggers an error with SANITIZE=1.

    Explicitly return the root section (if present) on NULL and avoid
    what the header on that platform incorrectly changes from standard
    compliant to undefined behaviour :(

    Resolves !721

    Co-Authored-By: Andy Alt <andy.alt@vert.synchro.net>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)