summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--translate.cxx3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fc7018b8..4db3af2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-27 Josh Stone <joshua.i.stone@intel.com>
+
+ * translate.cxx (c_unparser::visit_print_format): Fix the argument passed
+ for printf %c formats.
+
2008-10-27 Rajan Arora <rarora@redhat.com>
* elaborate.cxx (add_global_var_display): Added check for globals
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();
}