mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 22:35:37 +03:00
Fixed a bug where three of the new pragmas parsed spaces wrong
This commit is contained in:
parent
cfb36025b5
commit
dd7529b42c
@ -1026,6 +1026,7 @@ static int command(void)
|
|||||||
char name[sNAMEMAX+1],sname[sNAMEMAX+1];
|
char name[sNAMEMAX+1],sname[sNAMEMAX+1];
|
||||||
const char *prefix = "";
|
const char *prefix = "";
|
||||||
sname[0] = '\0';
|
sname[0] = '\0';
|
||||||
|
sname[1] = '\0';
|
||||||
if (!strcmp(str, "reqlib"))
|
if (!strcmp(str, "reqlib"))
|
||||||
prefix = "?rl_";
|
prefix = "?rl_";
|
||||||
else if (!strcmp(str, "reqclass"))
|
else if (!strcmp(str, "reqclass"))
|
||||||
@ -1049,14 +1050,14 @@ static int command(void)
|
|||||||
name[i]='\0';
|
name[i]='\0';
|
||||||
if (!strncmp(str, "exp", 3) || !strncmp(str, "def", 3))
|
if (!strncmp(str, "exp", 3) || !strncmp(str, "def", 3))
|
||||||
{
|
{
|
||||||
while (*lptr && isalpha(*lptr))
|
while (*lptr && isspace(*lptr))
|
||||||
lptr++;
|
lptr++;
|
||||||
for (i=1; i<sizeof sname && alphanum(*lptr); i++,lptr++)
|
for (i=1; i<sizeof sname && alphanum(*lptr); i++,lptr++)
|
||||||
sname[i]=*lptr;
|
sname[i]=*lptr;
|
||||||
sname[i] = '\0';
|
sname[i] = '\0';
|
||||||
if (!sname[1])
|
if (!sname[1])
|
||||||
{
|
{
|
||||||
error(28);
|
error(45);
|
||||||
} else {
|
} else {
|
||||||
sname[0] = '_';
|
sname[0] = '_';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user