From 0197d20ca012204762a857f67532ac9eac1ee16a Mon Sep 17 00:00:00 2001 From: fallenoak Date: Sat, 4 Feb 2023 23:50:00 -0600 Subject: [PATCH] chore(big): add assertion to BigStack::Free --- storm/big/BigStack.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storm/big/BigStack.cpp b/storm/big/BigStack.cpp index c2707f8..1182615 100644 --- a/storm/big/BigStack.cpp +++ b/storm/big/BigStack.cpp @@ -14,6 +14,8 @@ BigBuffer& BigStack::Alloc(uint32_t* count) { } void BigStack::Free(uint32_t count) { + STORM_ASSERT(count <= this->m_used); + this->m_used -= count; }