summaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 557482f2be4..e549c5cb657 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;