int show, int level, const struct type_print_options *flags)
{
enum type_code code;
- int demangled_args;
if (type_not_associated (type))
{
if (varstring != NULL)
{
+ int demangled_args;
+
fputs_filtered (varstring, stream);
/* For demangled function names, we have the arglist as part of the name,
so don't print an additional pair of ()'s. */
- demangled_args = varstring[strlen (varstring) - 1] == ')';
+ demangled_args = (*varstring != '\0'
+ && varstring[strlen (varstring) - 1] == ')');
f_type_print_varspec_suffix (type, stream, show, 0, demangled_args, 0);
}
}