diff options
author | Tom Tromey <tom@tromey.com> | 2022-01-26 18:07:18 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-10-10 10:43:33 -0600 |
commit | 1be8435c74de6738aec7ed623b59e381fa9bb644 (patch) | |
tree | 0a2e2d275bf9cc7b63bc5ece21ecfb828a78bc64 /gdb/valprint.c | |
parent | 79aafec96b237165e66f14ba963214fb709af847 (diff) | |
download | gdb-1be8435c74de6738aec7ed623b59e381fa9bb644.zip gdb-1be8435c74de6738aec7ed623b59e381fa9bb644.tar.gz gdb-1be8435c74de6738aec7ed623b59e381fa9bb644.tar.bz2 |
Fix latent quote char bug in generic_printstr
generic_printstr prints an empty string like:
fputs_filtered ("\"\"", stream);
However, this seems wrong to me if the quote character is something
other than double quote. This patch fixes this latent bug. Thanks to
Andrew for the test case.
Co-authored-by: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r-- | gdb/valprint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c index 91a5941..395c6e9 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -2516,7 +2516,7 @@ generic_printstr (struct ui_file *stream, struct type *type, if (length == 0) { - gdb_puts ("\"\"", stream); + gdb_printf (stream, "%c%c", quote_char, quote_char); return; } |