From 2b455c5c6b0994d827516d8ec85157905a6b9676 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 20 Apr 2024 00:42:07 +0200 Subject: [PATCH] Fix test issue in C++ --- tests/test-obj-except.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-obj-except.h b/tests/test-obj-except.h index 064dac33..9e6fbf31 100644 --- a/tests/test-obj-except.h +++ b/tests/test-obj-except.h @@ -41,7 +41,7 @@ extern int test_obj_except__malloc_counter; # define M_MEMORY_DEL(ptr) (test_obj_except__malloc_counter-=(ptr != NULL), std::free(ptr)) # define M_MEMORY_REALLOC(type, ptr, n) \ ((type*) (test_obj_except_trigger(), test_obj_except__malloc_counter+= (ptr == NULL), std::realloc ((ptr), (n)*sizeof (type)))) -# define M_MEMORY_FREE(ptr) (test_obj_except__malloc_counter--, std::free(ptr)) +# define M_MEMORY_FREE(ptr) (test_obj_except__malloc_counter-=(ptr != NULL), std::free(ptr)) #else # define M_MEMORY_ALLOC(type) (test_obj_except_trigger(), test_obj_except__malloc_counter++, malloc (sizeof (type))) # define M_MEMORY_DEL(ptr) (test_obj_except__malloc_counter-=(ptr != NULL), free(ptr))