Update:
I found the problem.
In this code of Day 19, at 0:47:15 in the video, where Casey is working on the DebugTimeMarkers debug code:
| win32_debug_time_marker* Marker = &DebugTimeMarkers[DebugTimeMarkerIndex++];
if (DebugTimeMarkerIndex > ArrayCount(DebugTimeMarkers)){
DebugTimeMarkerIndex = 0;
}
Marker->PlayCursor = PlayCursor;
Marker->WriteCursor = WriteCursor;
|
DebugTimeMarkerIndex needs to be greater than or equal to ArrayCount(DebugTimeMarkers) so that it wouldn't go out of bounds and modify the stack.
So I need to add '=' to '>' making '>=' for it to work correctly after closing it.
I hoped Casey sees this, as that is a Index Array Out-of-Bounds error waiting to happen in his code. I wondered if follow-up videos showed Casey fixing this error.
Please spoil me.
Update 2:
It's mentioned in Day 20. Nevermind...