summaryrefslogtreecommitdiffstats
path: root/translate.cxx
diff options
context:
space:
mode:
authorJosh Stone <joshua.i.stone@intel.com>2008-10-27 14:21:49 -0700
committerJosh Stone <joshua.i.stone@intel.com>2008-10-27 14:33:33 -0700
commit53b9e09f0b30e4f53ec492b345cbd1ab85afe929 (patch)
treed415ca6c6b05f55b3de9bdf08f18a0f828a844fb /translate.cxx
parent93f589fc4ea3a2882c039bf6da29c615550d0ee6 (diff)
downloadsystemtap-steved-53b9e09f0b30e4f53ec492b345cbd1ab85afe929.tar.gz
systemtap-steved-53b9e09f0b30e4f53ec492b345cbd1ab85afe929.tar.xz
systemtap-steved-53b9e09f0b30e4f53ec492b345cbd1ab85afe929.zip
Fix the argument passed for printf %c formats
This fix was noted in the comments to bug 6851, but for some reason it was not applied when originally committed.
Diffstat (limited to 'translate.cxx')
-rw-r--r--translate.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/translate.cxx b/translate.cxx
index bbd8a01b..ee6b21cb 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4196,6 +4196,9 @@ c_unparser::visit_print_format (print_format* e)
/* The type of the %m argument is 'char*'. */
if (components[i].type == print_format::conv_memory)
o->line() << ", (char*)(uintptr_t)" << tmp[arg_ix++].value();
+ /* The type of the %c argument is 'int'. */
+ else if (components[i].type == print_format::conv_char)
+ o->line() << ", (int)" << tmp[arg_ix++].value();
else
o->line() << ", " << tmp[arg_ix++].value();
}