Skip to content
  • Rob Swindell's avatar
    Don't store pointer to stack variable in sbbs_t::event_code · 1a9c141b
    Rob Swindell authored
    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.