Corrected another error in which some simple expressions are
incorrectly evaluated; "(w+l)" for example treats "w+l" as a single string instead of three tokens. Corrected the code to watch for a failure of strtod() when parsing the expression at the "+" sign (also for "-").
This commit is contained in:
parent
6b0bd4d97b
commit
d1c2848e4b
|
|
@ -300,6 +300,8 @@ int ReduceOneExpression(struct valuelist *kv, struct objlist *parprops,
|
||||||
tstr = sstr - 1;
|
tstr = sstr - 1;
|
||||||
numlast = 1;
|
numlast = 1;
|
||||||
}
|
}
|
||||||
|
/* But might not be. . . */
|
||||||
|
if ((dval != 0) || (sstr > estr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Not a number, so must be arithmetic */
|
/* Not a number, so must be arithmetic */
|
||||||
|
|
@ -320,6 +322,8 @@ int ReduceOneExpression(struct valuelist *kv, struct objlist *parprops,
|
||||||
tstr = sstr - 1;
|
tstr = sstr - 1;
|
||||||
numlast = 1;
|
numlast = 1;
|
||||||
}
|
}
|
||||||
|
/* But might not be. . . */
|
||||||
|
if ((dval != 0) || (sstr > estr))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Not a number, so must be arithmetic */
|
/* Not a number, so must be arithmetic */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue