strcpy() doesn't allow copying overlapping strings

SVN revision: 8518
This commit is contained in:
tsauerbeck 2004-01-17 12:39:01 +00:00 committed by tsauerbeck
parent dadd638530
commit b0431359c2
1 changed files with 3 additions and 3 deletions

View File

@ -237,11 +237,11 @@ next_token(char *p, char *end, char **new_p, int *delim)
while (*p)
{
if (*p == '"')
strcpy(p, p + 1);
memmove(p, p + 1, strlen(p));
else if ((*p == '\\') && (*(p + 1) == '"'))
strcpy(p, p + 1);
memmove(p, p + 1, strlen(p));
else if ((*p == '\\') && (*(p + 1) == '\\'))
strcpy(p, p + 1);
memmove(p, p + 1, strlen(p));
else
p++;
}