From: oetiker Date: Sun, 28 Apr 2002 14:14:48 +0000 (+0000) Subject: It's nice and simple, the error checker for the PRINT stuff which is X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=340e48aba0a2493ee675c2ca147e34ae6c603f6c;p=rrdtool.git It's nice and simple, the error checker for the PRINT stuff which is passed to printf() is not allowing certain valid printf() style operations which make text alignment much more fun. -- Richard A Steenbergen git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@131 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 074ad44..55f6cee 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -3258,6 +3258,9 @@ int bad_format(char *fmt) { ptr++; n++; if (*ptr == '\0') return 1; + else if (*ptr == ' ') ptr++; + else if (*ptr == '-') ptr++; + else if (*ptr == '+') ptr++; if (*ptr == 'e' || *ptr == 'f') { ptr++; } else { return 1; }