Fixing issue in String::remove

This commit is contained in:
me-no-dev 2021-03-04 22:41:46 +02:00
parent 22a488cf23
commit 0e55f775d3

View File

@ -796,8 +796,8 @@ void String::remove(unsigned int index, unsigned int count) {
}
char *writeTo = wbuffer() + index;
unsigned int newlen = len() - count;
setLen(newlen);
memmove(writeTo, wbuffer() + index + count, newlen - index);
setLen(newlen);
wbuffer()[newlen] = 0;
}