non_ir_ref_dynamic
[deliverable/binutils-gdb.git] / gdb / f-typeprint.c
index da6ef4f92e5c861ad82732588df1b4c8e38b5da8..7dbe093a7fcafd12353189207f1ded02f20989ff 100644 (file)
@@ -52,7 +52,6 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
              int show, int level, const struct type_print_options *flags)
 {
   enum type_code code;
-  int demangled_args;
 
   if (type_not_associated (type))
     {
@@ -81,12 +80,15 @@ f_print_type (struct type *type, const char *varstring, struct ui_file *stream,
 
   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);
    }
 }
This page took 0.024036 seconds and 4 git commands to generate.