• src/sbbs3/data.cpp sbbs.h

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Wed Jan 24 18:03:44 2024
    Modified Files:
    src/sbbs3/data.cpp sbbs.h
    Log Message:
    Don't store pointer to stack variable in sbbs_t::event_code

    sbbs_t::gettimeleft() was storing a pointer to a stack (temporary/local) variable containing a copy of the next exclusive event cfg (including its internal code). This variable, including the internal code, is invalid when
    it goes out of scope. This change makes the sbbs_t::event_code point to the sbbs_t::cfg.event[]->code (on the heap) instead.

    The only use of this event_code (outside of the event_thread), appears to be
    in the JS bbs.event_code property string. So this fixes issue #705. No other observed side effect from this bug.

    Constified getnexteventtime() while here. No functional impact.

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