From: oetiker Date: Sat, 10 Mar 2007 17:36:32 +0000 (+0000) Subject: integers can be negative ... fixed the test for this in rrd_update -- rians cc usu edu X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a68269317539ab82c1cdf3e0c8929e647d809b8c;p=rrdtool-all.git integers can be negative ... fixed the test for this in rrd_update -- rians cc usu edu git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1013 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index cca6e52e..0143e9e6 100644 --- a/program/src/rrd_update.c +++ b/program/src/rrd_update.c @@ -615,7 +615,7 @@ _rrd_update(char *filename, char *tmplt, int argc, char **argv, case DST_DERIVE: if(rrd.pdp_prep[i].last_ds[0] != 'U'){ for(ii=0;updvals[i+1][ii] != '\0';ii++){ - if(updvals[i+1][ii] < '0' || updvals[i+1][ii] > '9' || (ii==0 && updvals[i+1][ii] == '-')){ + if((updvals[i+1][ii] < '0' || updvals[i+1][ii] > '9') && (ii != 0 && updvals[i+1][ii] != '-')){ rrd_set_error("not a simple integer: '%s'",updvals[i+1]); break; }