Commit 053f30e5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Fix error handling in parser.

parent 5063ac95
...@@ -224,6 +224,7 @@ parse_filter(gnc_t gnc, void *closure) ...@@ -224,6 +224,7 @@ parse_filter(gnc_t gnc, void *closure)
} else if(strcmp(token, "metric") == 0) { } else if(strcmp(token, "metric") == 0) {
int metric; int metric;
c = getint(c, &metric, gnc, closure); c = getint(c, &metric, gnc, closure);
if(c < -1) goto error;
if(metric <= 0 || metric > INFINITY) if(metric <= 0 || metric > INFINITY)
goto error; goto error;
filter->result = metric; filter->result = metric;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment