diff options
Diffstat (limited to 'crawl-ref/source/cio.cc')
-rw-r--r-- | crawl-ref/source/cio.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/cio.cc b/crawl-ref/source/cio.cc index b9ff80c25f..b3382bf6fc 100644 --- a/crawl-ref/source/cio.cc +++ b/crawl-ref/source/cio.cc @@ -426,6 +426,15 @@ int line_reader::read_line(bool clear_previous) { int ch = getchm(c_getch); +#if defined(USE_UNIX_SIGNALS) && defined(SIGHUP_SAVE) && defined(USE_CURSES) + // Don't return a partial string if a HUP signal interrupted things + if (crawl_state.seen_hups) + { + buffer[0] = '\0'; + return (0); + } +#endif + if (keyfn) { int whattodo = (*keyfn)(ch); |