From ced2719760c478517093736a36261f8bce9bd311 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 22 Apr 2024 22:59:54 +0200 Subject: [PATCH] Make string functions exception aware --- m-string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/m-string.h b/m-string.h index 0348b45c..4231857f 100644 --- a/m-string.h +++ b/m-string.h @@ -1266,6 +1266,7 @@ m_string_fget_word (m_string_t v, const char separator[], FILE *f) break; /* Next char is not a separator: continue parsing */ m_str1ng_set_size(v, size); + M_IF_EXCEPTION( m_str1ng_get_cstr(v)[size] = 0); ptr = m_str1ng_fit2size (v, alloc + alloc/2); alloc = m_string_capacity(v); M_ASSERT (alloc > size + 1);