tdauth / tenet

Tenet-style prototype map for Warcraft III: Reforged
0 stars 0 forks source link

Fix TimeFrameImpl.flush #38

Closed tdauth closed 3 years ago

tdauth commented 3 years ago

The issue is here:

public stub method flush takes nothing returns nothing
        loop
            exitwhen (this.getChangeEventsSize() == 1)
            call this.changeEventsHead.popBack().destroy()
        endloop
        call this.changeEventsHead.clear()
        call this.changeEventsHead.destroy()
        set this.changeEventsHead = 0
endmethod

The exitwhen condition can be always false since changeEventsHead can be 0 and hence the size will never be 1. The crashes and lags come from this call!