common/buf.c: do not use memcpy for overlapping regions

This commit is contained in:
Johan Malm 2023-09-23 15:16:57 +01:00 committed by Johan Malm
parent 881d788bee
commit ccc3d14658

View file

@ -41,7 +41,7 @@ strip_curly_braces(char *s)
return; return;
} }
len -= 2; len -= 2;
memcpy(s, s + 1, len); memmove(s, s + 1, len);
s[len] = 0; s[len] = 0;
} }