From: alex Date: Sat, 22 Dec 2001 02:49:23 +0000 (+0000) Subject: Somehow eight lines were missing from function rrd_graph(). X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e882b59504803ffe62eaeff5efaf0ff730d85744;p=rrdtool.git Somehow eight lines were missing from function rrd_graph(). Also fixed minor bug in vdef_calc(). git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@58 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 156b1b0..2731477 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -2932,6 +2932,13 @@ printf("DEBUG: strstart==%i\n",strstart); ); if (strstart==0) { im_free(&im); + rrd_set_error("Cannot parse '%s' in VDEF '%s'", + &argv[i][argstart], + im.gdes[im.gdes_c-1].vname); + return -1; + } + if ((im.gdes[im.gdes_c-1].vidx=find_var(&im,varname)) == -1) { + im_free(&im); rrd_set_error("variable '%s' not known in VDEF '%s'", varname, im.gdes[im.gdes_c-1].vname); @@ -3201,13 +3208,13 @@ printf("DEBUG: %3li:%10.2f %c\n",step,array[step],step==field?'*':' '); dst->vf.val = DNAN; dst->vf.when = 0; } else { - dst->vf.val = data[steps*src->ds_cnt]; + dst->vf.val = data[step*src->ds_cnt]; dst->vf.when = src->start + (step+1)*src->step; } while (step != steps) { if (finite(data[step*src->ds_cnt])) { if (data[step*src->ds_cnt] > dst->vf.val) { - dst->vf.val = data[steps*src->ds_cnt]; + dst->vf.val = data[step*src->ds_cnt]; dst->vf.when = src->start + (step+1)*src->step; } } @@ -3245,13 +3252,13 @@ printf("DEBUG: %3li:%10.2f %c\n",step,array[step],step==field?'*':' '); dst->vf.val = DNAN; dst->vf.when = 0; } else { - dst->vf.val = data[steps*src->ds_cnt]; + dst->vf.val = data[step*src->ds_cnt]; dst->vf.when = src->start + (step+1)*src->step; } while (step != steps) { if (finite(data[step*src->ds_cnt])) { if (data[step*src->ds_cnt] < dst->vf.val) { - dst->vf.val = data[steps*src->ds_cnt]; + dst->vf.val = data[step*src->ds_cnt]; dst->vf.when = src->start + (step+1)*src->step; } }