From: Tobias Oetiker Date: Mon, 11 Mar 2013 08:06:35 +0000 (+0100) Subject: when using \ to escape a character from processing, the \ should not show up in the... X-Git-Tag: v1.5.0-rc1~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f149e0ea1dd739024a1e0a3af4d4faeb33883a88;p=thirdparty%2Frrdtool-1.x.git when using \ to escape a character from processing, the \ should not show up in the final result --- diff --git a/src/rrd_graph_helper.c b/src/rrd_graph_helper.c index 2a9091a5..7df07dd7 100644 --- a/src/rrd_graph_helper.c +++ b/src/rrd_graph_helper.c @@ -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 ':':