]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
when using \ to escape a character from processing, the \ should not show up in the...
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 11 Mar 2013 08:06:35 +0000 (09:06 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 11 Mar 2013 08:06:35 +0000 (09:06 +0100)
src/rrd_graph_helper.c

index 2a9091a540d79cf71ab4d4f6c7b813a36ad49a1e..7df07dd72cc107964759e480658d535104c661d5 100644 (file)
@@ -204,7 +204,10 @@ int parseArguments(const char* origarg, parsedargs_t* pa) {
     switch (c) {
       /* if the char is a backslash, then this escapes the next one */
     case '\\':
-      if (pos[1]) { pos++; }
+      if (pos[1]) {
+        /* move up the rest of the string to eat the backslash */
+        memmove(pos,pos+1,strlen(pos+1)+1);
+      }
       break;
     case 0:
     case ':':