diff options
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r-- | gdb/c-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 557482f..e549c5c 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -254,7 +254,7 @@ c_get_string (struct value *value, gdb::unique_xmalloc_ptr<gdb_byte> *buffer, { /* If we know the size of the array, we can use it as a limit on the number of characters to be fetched. */ - if (TYPE_NFIELDS (type) == 1 + if (type->num_fields () == 1 && TYPE_FIELD_TYPE (type, 0)->code () == TYPE_CODE_RANGE) { LONGEST low_bound, high_bound; |