diff options
Diffstat (limited to 'src/scope.c')
-rw-r--r-- | src/scope.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scope.c b/src/scope.c index 662e59c..6338e60 100644 --- a/src/scope.c +++ b/src/scope.c @@ -15,6 +15,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ #include "scope.h" +#include <assert.h> #include <errno.h> #include <stdio.h> #include <string.h> @@ -58,6 +59,7 @@ scope_destroy(scope_t *scope) fprintf(stderr, "Stack not cleaned before destroying. This may lead to memory leaks.\n" "Please make sure to call the leave function before destroying it."); + assert(scope->stack->size == 1); } for (size_t i = 0; i < scope->stack->size; i++) { |