Add new assertion.
This commit is contained in:
1 parent
69177b6b69
commit
ee22399bab
1 file changed
+1
@@ -200,6 +200,7 @@ string_set (string_t v1, const string_t v2)
|
|||||||
if (M_LIKELY (v2->ptr != NULL)) {
|
if (M_LIKELY (v2->ptr != NULL)) {
|
||||||
memcpy(v1->ptr, v2->ptr, size+1);
|
memcpy(v1->ptr, v2->ptr, size+1);
|
||||||
} else {
|
} else {
|
||||||
|
assert (size == 0);
|
||||||
v1->ptr[0] = 0;
|
v1->ptr[0] = 0;
|
||||||
}
|
}
|
||||||
v1->size = size;
|
v1->size = size;
|
||||||
|
|||||||
Reference in new issue
Block a user