aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-10-18 15:26:01 +0000
committerTom Tromey <tromey@redhat.com>2012-10-18 15:26:01 +0000
commitfff106847e06f1bddcbfa1879013c47a270e4f18 (patch)
tree17c6a4eca78a50755c6ff267e035b1a8ada645ba /gdb/valprint.c
parent4ad3b7ef02a26744c4f648411537e240274999fe (diff)
downloadgdb-fff106847e06f1bddcbfa1879013c47a270e4f18.zip
gdb-fff106847e06f1bddcbfa1879013c47a270e4f18.tar.gz
gdb-fff106847e06f1bddcbfa1879013c47a270e4f18.tar.bz2
* valprint.c (generic_emit_char, generic_printstr): Pass size of
gdb_wchar_t to convert_between_encodings.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 6e651f6..583329d 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2037,7 +2037,7 @@ generic_emit_char (int c, struct type *type, struct ui_file *stream,
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
- 1, &output, translit_char);
+ sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
fputs_filtered (obstack_base (&output), stream);
@@ -2278,7 +2278,7 @@ generic_printstr (struct ui_file *stream, struct type *type,
convert_between_encodings (INTERMEDIATE_ENCODING, host_charset (),
obstack_base (&wchar_buf),
obstack_object_size (&wchar_buf),
- 1, &output, translit_char);
+ sizeof (gdb_wchar_t), &output, translit_char);
obstack_1grow (&output, '\0');
fputs_filtered (obstack_base (&output), stream);