From d0ecc03abe4b658f671898985d4ea9d2d124d5e8 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 9 Dec 2017 16:39:58 +0100 Subject: [PATCH] Add some more assertions --- m-string.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/m-string.h b/m-string.h index 90f8d04f..e2f31489 100644 --- a/m-string.h +++ b/m-string.h @@ -922,6 +922,7 @@ string_it(string_it_t it, const string_t str) static inline bool string_end_p (string_it_t it) { + assert (it != NULL); if (*it->ptr == 0) return true; stringi_utf8_state_e state = STRINGI_UTF8_STARTING; @@ -939,12 +940,14 @@ string_end_p (string_it_t it) static inline void string_next (string_it_t it) { + assert (it != NULL); it->ptr = it->next_ptr; } static inline string_unicode_t string_get_cref (const string_it_t it) { + assert (it != NULL); return it->u; }