aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2009-08-05 19:28:20 -0400
committerJosh Triplett <josh@joshtriplett.org>2009-08-05 19:31:42 -0400
commite83791453f4461527d8fb4ffedb5bbe87d6ebfe1 (patch)
treebbefedc2f750c8ab7121614521ca1838dc4506fa
parent9ae6b301bb3e9b58048dcaed8fa45797673206b9 (diff)
Fix bug that made %pf not work at the end of a fmt (and %pF not work at all)
When parsing %pf or %pF, pretty_print checked if the next character matched 'f' or 'F', and if so, set show_func to the character *after* that. If not at the end of the string, this would still have the effect of 'f', since pretty_print only checked for non-zero show_func; however, 'F' would not work. If at the end of the string, show_func would get the '\0', which disabled function printing entirely. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--parse-events.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-events.c b/parse-events.c
index ee2bd5b..4389c4e 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -2235,7 +2235,7 @@ static void pretty_print(void *data, int size, struct event *event)
2235 if (*(ptr+1) == 'F' || 2235 if (*(ptr+1) == 'F' ||
2236 *(ptr+1) == 'f') { 2236 *(ptr+1) == 'f') {
2237 ptr++; 2237 ptr++;
2238 show_func = *(ptr+1); 2238 show_func = *ptr;
2239 } 2239 }
2240 2240
2241 /* fall through */ 2241 /* fall through */