Add assertion

This commit is contained in:
Patrick Pelissier committed 2017-08-14 23:33:08 +02:00
1 parent 866e1e0b7a
commit d3c139e195
1 file changed
+1
+1
View File
@@ -247,6 +247,7 @@ string_set_n(string_t v, const string_t ref, size_t offset, size_t length)
{
STRING_CONTRACT (v);
STRING_CONTRACT (ref);
assert (offset <= ref->size);
assert (v != ref); // Not supported yet
if (M_UNLIKELY (ref->size == 0)) {
v->size = 0;