mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 23:25:41 +03:00
Fix: Improperly reversed function CBasePlayer::ParseAutoBuyString
This commit is contained in:
parent
bfa30daadb
commit
6b05ce2c89
@ -9022,28 +9022,24 @@ void CBasePlayer::ParseAutoBuyString(const char *string, bool &boughtPrimary, bo
|
|||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (*c && (*c != ' ') && i < sizeof(command))
|
while (*c && (*c != ' ') && i < sizeof(command) - 1)
|
||||||
{
|
{
|
||||||
command[i] = *c;
|
command[i++] = *c++;
|
||||||
++c;
|
|
||||||
++i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*c == ' ')
|
if (*c == ' ')
|
||||||
++c;
|
++c;
|
||||||
|
|
||||||
command[i] = 0;
|
command[i] = '\0';
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
while (command[i] != 0)
|
while (command[i] != '\0')
|
||||||
{
|
{
|
||||||
if (command[i] == ' ')
|
if (command[++i] == ' ')
|
||||||
{
|
{
|
||||||
command[i] = 0;
|
command[i] = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Q_strlen(command))
|
if (!Q_strlen(command))
|
||||||
|
Loading…
Reference in New Issue
Block a user