Skip to content
Snippets Groups Projects
Commit 1ea66f5b authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

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.
parent 1321d7f5
No related branches found
No related tags found
No related merge requests found
Pipeline #5421 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment