summaryrefslogtreecommitdiff
path: root/src/stdlib/_stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/_stdlib.h')
-rw-r--r--src/stdlib/_stdlib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stdlib/_stdlib.h b/src/stdlib/_stdlib.h
index 64e64abd..75210bbf 100644
--- a/src/stdlib/_stdlib.h
+++ b/src/stdlib/_stdlib.h
@@ -9,6 +9,9 @@
#ifndef NDEBUG
#define ASSERT_CTYPE(__s_ptr) do { \
static unsigned int __ctype_epoch = 0; \
+ if (__ctype_epoch == 0) { \
+ __ctype_epoch = __get_ctype_epoch(); \
+ } \
if ((__s_ptr) == 0) { \
__ctype_epoch = __get_ctype_epoch(); \
} else if (__ctype_epoch != __get_ctype_epoch()) { \