From ee22399babcac88dc2e07639a3ffc43c4913e8a2 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 9 Jul 2017 19:28:57 +0200 Subject: [PATCH] Add new assertion. --- m-string.h | 1 + 1 file changed, 1 insertion(+) diff --git a/m-string.h b/m-string.h index 34847c36..fc6a887b 100644 --- a/m-string.h +++ b/m-string.h @@ -200,6 +200,7 @@ string_set (string_t v1, const string_t v2) if (M_LIKELY (v2->ptr != NULL)) { memcpy(v1->ptr, v2->ptr, size+1); } else { + assert (size == 0); v1->ptr[0] = 0; } v1->size = size;