]> granicus.if.org Git - nethack/commitdiff
tty: msg_window and long messages
authorcohrs <cohrs>
Sun, 10 Feb 2002 20:48:01 +0000 (20:48 +0000)
committercohrs <cohrs>
Sun, 10 Feb 2002 20:48:01 +0000 (20:48 +0000)
the code that puts long messages into the top line inserts newlines into
the message, but the msg_window code wasn't looking for them.

win/tty/wintty.c

index c17a76ce2884304312868a046a4eab0519305bf1..434c915293e3b322d934f5292fc146711c70b855 100644 (file)
@@ -1851,7 +1851,7 @@ tty_putstr(window, attr, str)
            cw->maxrow = cw->cury;
        if(n0 > CO) {
            /* attempt to break the line */
-           for(i = CO-1; i && str[i] != ' ';)
+           for(i = CO-1; i && str[i] != ' ' && str[i] != '\n';)
                i--;
            if(i) {
                cw->data[cw->cury-1][++i] = '\0';