1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-22 21:32:29 +02:00

b2/eval.c (eval_rel): fix stop pointer when parsing absolute tolerance values

This commit is contained in:
Werner Almesberger 2012-05-31 15:48:32 -03:00
parent 6159bdfcdb
commit 8c26e5f708

View File

@ -211,7 +211,7 @@ int eval_rel(const struct format *fmt, const char *s,
stop = strchr(s, 0);
if (!strip_unit(s, &stop, fmt->u.rel->u.abs, &mult))
return 0;
if (!relative(s, perc, &res->u.rel.plus, &res->u.rel.minus))
if (!relative(s, stop, &res->u.rel.plus, &res->u.rel.minus))
return 0;
res->u.rel.plus *= mult;
res->u.rel.minus *= mult;