Fix an illegal memory access triggered when trying to examine an input file containin...
[deliverable/binutils-gdb.git] / gdb / ui-file.c
index 10192a98cd04a9289bcd2cb14fae748d0a9993a6..af128b08f54f73575d567e7c19a6ad60311ca746 100644 (file)
@@ -302,7 +302,7 @@ stdio_file::isatty ()
 bool
 stdio_file::can_emit_style_escape ()
 {
-  return (this == gdb_stdout
+  return ((this == gdb_stdout || this == gdb_stderr)
          && this->isatty ()
          && term_cli_styling ());
 }
@@ -391,7 +391,7 @@ tee_file::term_out ()
 bool
 tee_file::can_emit_style_escape ()
 {
-  return (this == gdb_stdout
+  return ((this == gdb_stdout || this == gdb_stderr)
          && m_one->term_out ()
          && term_cli_styling ());
 }
This page took 0.023374 seconds and 4 git commands to generate.