mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 12:50:44 +00:00
Use strchr?
This commit is contained in:
parent
fe7220bb20
commit
3286d9ac93
1 changed files with 19 additions and 26 deletions
|
@ -543,9 +543,7 @@ static void COM_ExecuteString(char *ptext)
|
|||
char buf[1024];
|
||||
char *write = buf, *read = a->value, *seek = read;
|
||||
|
||||
while (*seek != '\0')
|
||||
{
|
||||
if (*seek == '$')
|
||||
while ((seek = strchr(seek, '$')) != NULL)
|
||||
{
|
||||
memcpy(write, read, seek-read);
|
||||
write += seek-read;
|
||||
|
@ -569,12 +567,7 @@ static void COM_ExecuteString(char *ptext)
|
|||
|
||||
read = seek;
|
||||
}
|
||||
else
|
||||
seek++;
|
||||
}
|
||||
memcpy(write, read, seek-read);
|
||||
write += seek-read;
|
||||
*write = '\0';
|
||||
WRITESTRING(write, read);
|
||||
|
||||
recursion++;
|
||||
COM_BufInsertText(buf);
|
||||
|
|
Loading…
Reference in a new issue