]> granicus.if.org Git - nethack/commitdiff
Added assertions to check toplin state.
authorBart House <bart@barthouse.com>
Fri, 12 Jul 2019 03:58:20 +0000 (20:58 -0700)
committerBart House <bart@barthouse.com>
Mon, 19 Oct 2020 22:59:46 +0000 (15:59 -0700)
win/tty/wintty.c

index 1cf55a7a98e67e93414deb89a00705d70e9c30c8..44445f761068a49b4104acaa6e9e49d1e3dd3b53 100644 (file)
@@ -2357,7 +2357,7 @@ boolean blocking; /* with ttys, all windows are blocking */
             more();
             ttyDisplay->toplin = TOPLINE_NEED_MORE; /* more resets this */
             tty_clear_nhwindow(window);
-            /* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
+            nhassert(ttyDisplay->toplin == TOPLINE_EMPTY);
         } else
             ttyDisplay->toplin = TOPLINE_EMPTY;
         cw->curx = cw->cury = 0;
@@ -2445,7 +2445,7 @@ winid window;
     case NHW_MESSAGE:
         if (ttyDisplay->toplin != TOPLINE_EMPTY)
             tty_display_nhwindow(WIN_MESSAGE, TRUE);
-        /* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
+        nhassert(ttyDisplay->toplin == TOPLINE_EMPTY);
         /*FALLTHRU*/
     case NHW_STATUS:
     case NHW_BASE:
@@ -3200,7 +3200,7 @@ const char *mesg;
         more();
         ttyDisplay->toplin = TOPLINE_NEED_MORE; /* more resets this */
         tty_clear_nhwindow(WIN_MESSAGE);
-        /* nhassert(ttyDisplay->toplin == TOPLINE_EMPTY); */
+        nhassert(ttyDisplay->toplin == TOPLINE_EMPTY);
     }
     /* normally <ESC> means skip further messages, but in this case
        it means cancel the current prompt; any other messages should