]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
rrd_graph did not process --grid-dash option ... fixed
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 29 Jun 2015 09:08:18 +0000 (11:08 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 29 Jun 2015 09:08:18 +0000 (11:08 +0200)
src/rrd_graph.c

index 7425890159add46628f524f3ed8d70406cec50ce..9e5912e23bdd4feab80be776afe29c328c40c9ff 100644 (file)
@@ -5049,12 +5049,15 @@ void rrd_graph_options(
             if(sscanf(optarg,
                       "%40[0-9.e+-]:%40[0-9.e+-]",
                       double_str,
-                      double_str2 ) != 2) {
+                      double_str2 ) == 2) {
                 if ( rrd_strtodbl( double_str, 0, &(im->grid_dash_on),NULL) !=2
                      || rrd_strtodbl( double_str2, 0, &(im->grid_dash_off), NULL) != 2 ){
                     rrd_set_error("expected grid-dash format float:float");
                     return;
                 }
+            } else {
+                    rrd_set_error("invalid grid-dash format");
+                    return;
             }
             break;
         case 1009: /* enable dynamic labels */