aboutsummaryrefslogtreecommitdiffstats
path: root/parse-events.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-10-12 13:08:11 -0400
committerSteven Rostedt <rostedt@goodmis.org>2009-10-12 13:49:10 -0400
commitfe199059f0caf4df404ab6a8dcb08feec41eca61 (patch)
treea5d827858396d91a250f267e04fa00b55508e33e /parse-events.c
parented5ed8f37c85b91e0bcb89f0c8ec9d5b31bca047 (diff)
handle '\' in print format.
The '\' code to handle '\"' was incorrect. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'parse-events.c')
-rw-r--r--parse-events.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/parse-events.c b/parse-events.c
index b22cd71..80e31d3 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -537,7 +537,10 @@ enum event_type __read_token(char **tok)
537 last_ch = ch; 537 last_ch = ch;
538 ch = __read_char(); 538 ch = __read_char();
539 buf[i++] = ch; 539 buf[i++] = ch;
540 } while (ch != quote_ch && last_ch != '\\'); 540 /* the '\' '\' will cancel itself */
541 if (ch == '\\' && last_ch == '\\')
542 last_ch = 0;
543 } while (ch != quote_ch || last_ch == '\\');
541 /* remove the last quote */ 544 /* remove the last quote */
542 i--; 545 i--;
543 goto out; 546 goto out;