medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2f911485a3b21d27a822eb3f991f8a8861b4200e
parent f982cf2ad3c4a7bbaf400f15e17ffcbb0d24ea1d
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sun Aug 16 20:19:24 +0200

Check MemoryArenaCheckpoints are popped in the right order

Diffstat:
memory_arena.cc | 1+
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/memory_arena.cc b/memory_arena.cc @@ -35,6 +35,7 @@ MemoryArenaCheckpoint memarena_checkpoint( MemoryArena * const arena ) { void memarena_restore( MemoryArena * arena, MemoryArenaCheckpoint * const cp ) { assert( arena->num_checkpoints > 0 ); assert( !cp->restored ); + assert( arena->used >= cp->used ); arena->used = cp->used; arena->num_checkpoints--;