forked from Imagelibrary/binutils-gdb
* c-valprint.c (c_val_print): Fix thinko with unspecified length
arrays.
This commit is contained in:
@@ -137,8 +137,8 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
|
||||
break;
|
||||
}
|
||||
/* Array of unspecified length: treat like pointer to first elt. */
|
||||
valaddr = (char *) &address;
|
||||
/* FALL THROUGH */
|
||||
addr = address;
|
||||
goto print_unpacked_pointer;
|
||||
|
||||
case TYPE_CODE_PTR:
|
||||
if (format && format != 's')
|
||||
@@ -159,6 +159,7 @@ c_val_print (type, valaddr, address, stream, format, deref_ref, recurse,
|
||||
else
|
||||
{
|
||||
addr = unpack_pointer (type, valaddr);
|
||||
print_unpacked_pointer:
|
||||
elttype = TYPE_TARGET_TYPE (type);
|
||||
|
||||
if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
|
||||
|
||||
Reference in New Issue
Block a user