Add assertion
This commit is contained in:
1 parent
866e1e0b7a
commit
d3c139e195
1 file changed
+1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user