My fix for #84 (
cfec4f1ed81a8e733effbaa93acd917e7f6bded0) neglected to
take into account the fact that interpret() would be called before the
game ends under certain rare circumstances. Therefore, I've added a
reset_screen() to main() which contains the final call to new_line().
extern void interpret (void);
extern void init_memory (void);
extern void init_undo (void);
+extern void reset_screen (void);
extern void reset_memory (void);
bool need_newline_at_exit = FALSE;
interpret ();
+ reset_screen ();
+
reset_memory ();
os_reset_screen ();
os_tick();
} while (finished == 0);
- if (need_newline_at_exit)
- new_line();
-
finished--;
}/* interpret */
}/* reset_cursor */
+/*
+ * reset_screen
+ *
+ * Do any interface-independent screen cleanup prior to exiting the game.
+ *
+ */
+void reset_screen (void)
+{
+ if (need_newline_at_exit)
+ new_line();
+
+}/* reset_screen */
+
/*
* set_more_prompts
*