X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fcstring.c;h=558a78662bc29aa2a68859a58f1d0b01e20ec171;hb=aaef0d22541650ed73e094363e1886943ca035d3;hp=d321260465c9015c59d53ba87e60e4c43c3cdcca;hpb=4499a0ea0cecd41b7053ce5768a85efdfc48848a;p=smdp.git diff --git a/src/cstring.c b/src/cstring.c index d321260..558a786 100644 --- a/src/cstring.c +++ b/src/cstring.c @@ -76,7 +76,7 @@ void cstring_strip(cstring_t *self, int pos, int len) { } return; } - memmove(&self->text[pos], &self->text[pos+len], self->size - pos); + memmove(&self->text[pos], &self->text[pos+len], self->size - pos - len+1); self->size -= len; }