Fix buglet noticed while looking at PR 1298.
authorJim Wilson <wilson@tuliptree.org>
Sat, 29 Apr 2006 03:11:31 +0000 (03:11 +0000)
committerJim Wilson <wilson@tuliptree.org>
Sat, 29 Apr 2006 03:11:31 +0000 (03:11 +0000)
* m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing
error message.

opcodes/ChangeLog
opcodes/m68k-dis.c

index e786c1cc6004f0d4fab509d10da15084844af3a8..84ecdcfcbd7b3aafa090fac7ff157456d1c536e3 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-28  James E Wilson  <wilson@specifix.com>
+
+       * m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing
+       error message.
+
 2006-04-28  Thiemo Seufer  <ths@mips.com>
             David Ung  <davidu@mips.com>
            Nigel Stephens  <nigel@mips.com>
index 8fc70152663d0d74a9196335f9fc36f853e04d21..309496381de9fbb39a08caea609aa5ba1ff39f04 100644 (file)
@@ -1308,12 +1308,14 @@ match_insn_m68k (bfd_vma memaddr,
        }
       else
        {
+         /* We must restore the print functions before trying to print the
+            error message.  */
+         info->fprintf_func = save_printer;
+         info->print_address_func = save_print_address;
          info->fprintf_func (info->stream,
                              /* xgettext:c-format */
                              _("<internal error in opcode table: %s %s>\n"),
                              best->name,  best->args);
-         info->fprintf_func = save_printer;
-         info->print_address_func = save_print_address;
          return 2;
        }
     }