Possible incorrect use of print_string() in os_reset_screen().
authorDavid Griffith <dave@661.org>
Tue, 10 Jan 2017 12:36:10 +0000 (04:36 -0800)
committerDavid Griffith <dave@661.org>
Tue, 10 Jan 2017 12:37:35 +0000 (04:37 -0800)
If print_string() and probably by extension print_char() are used before
the Z-machine is running, a few random garbage characters are printed
instead of the intended text.  I'm not clear why this happens.

src/curses/ux_init.c

index ffd7158befa6ddbf1103ae44f3f0fb256b003713..257b5475122d50e12002a137496cf6842a8add89 100644 (file)
@@ -509,7 +509,7 @@ void os_reset_screen (void)
 {
     os_stop_sample(0);
     os_set_text_style(0);
-    print_string("[Hit any key to exit.]\n");
+    os_display_string((zchar *)"[Hit any key to exit.]\n");
     os_read_key(0, FALSE);
     scrollok(stdscr, TRUE); scroll(stdscr);
     refresh(); endwin();