Fix faulty assert
It is allowed for symbol names to be up to sNAMEMAX characters but the assert() restricted them to sNAMEMAX-1 characters, so it would fail for any long enough name. Ran across this investigating #21.
This commit is contained in:
parent
53ef10ffc7
commit
a272a7e43e
@ -4737,7 +4737,7 @@ static constvalue *insert_constval(constvalue *prev,constvalue *next,const char
|
||||
error(103); /* insufficient memory (fatal error) */
|
||||
memset(cur,0,sizeof(constvalue));
|
||||
if (name!=NULL) {
|
||||
assert(strlen(name)<sNAMEMAX);
|
||||
assert(strlen(name)<sNAMEMAX+1);
|
||||
strcpy(cur->name,name);
|
||||
} /* if */
|
||||
cur->value=val;
|
||||
|
Loading…
x
Reference in New Issue
Block a user