a simpler fix for '#pragma option'
This commit is contained in:
parent
ff162b3e2e
commit
51fdf6f825
@ -1342,14 +1342,9 @@ static int command(void)
|
|||||||
/* first gather all information, start with the tag name */
|
/* first gather all information, start with the tag name */
|
||||||
while (*lptr<=' ' && *lptr!='\0')
|
while (*lptr<=' ' && *lptr!='\0')
|
||||||
lptr++;
|
lptr++;
|
||||||
for (i=0; i<sizeof name && *lptr>' '; i++,lptr++)
|
for (i=0; i<sNAMEMAX && *lptr>' '; i++,lptr++)
|
||||||
name[i]=*lptr;
|
name[i]=*lptr;
|
||||||
/* check if 'i' is 32 or not to prevent OOB */
|
name[i]='\0';
|
||||||
if (i==sNAMEMAX+1) {
|
|
||||||
name[i-1]='\0';
|
|
||||||
} else {
|
|
||||||
name[i]='\0';
|
|
||||||
}
|
|
||||||
parsesingleoption(name);
|
parsesingleoption(name);
|
||||||
} else {
|
} else {
|
||||||
error(207); /* unknown #pragma */
|
error(207); /* unknown #pragma */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user