From e46bbaffb94e3303a2c20ccebb5713acad4637fb Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 5 Jul 2021 23:14:21 +0200 Subject: [PATCH] Avoid GCC warning (-Wstringop-truncation) --- m-string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/m-string.h b/m-string.h index 212037f4..417de12d 100644 --- a/m-string.h +++ b/m-string.h @@ -2057,6 +2057,7 @@ namespace m_lib { { \ M_BOUNDED_STR1NG_CONTRACT(s, max_size); \ m_core_strncpy(s->s, max_size+1, str, max_size); \ + s->s[max_size] = 0; \ M_BOUNDED_STR1NG_CONTRACT(s, max_size); \ } \ \