From 1df9202dbf484818cb46ba94e30b37af5a1cce60 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 23 Jul 2005 18:54:30 +0000 Subject: Fix quit prompt not displayed properly Subversion-branch: /trunk/chocolate-doom Subversion-revision: 17 --- src/m_menu.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/m_menu.c') diff --git a/src/m_menu.c b/src/m_menu.c index 76405296..4d9adf74 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1,7 +1,7 @@ // Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // -// $Id: m_menu.c 8 2005-07-23 16:44:57Z fraggle $ +// $Id: m_menu.c 17 2005-07-23 18:54:30Z fraggle $ // // Copyright(C) 1993-1996 Id Software, Inc. // Copyright(C) 2005 Simon Howard @@ -22,6 +22,9 @@ // 02111-1307, USA. // // $Log$ +// Revision 1.3 2005/07/23 18:54:30 fraggle +// Fix quit prompt not displayed properly +// // Revision 1.2 2005/07/23 16:44:55 fraggle // Update copyright to GNU GPL // @@ -36,7 +39,7 @@ //----------------------------------------------------------------------------- static const char -rcsid[] = "$Id: m_menu.c 8 2005-07-23 16:44:57Z fraggle $"; +rcsid[] = "$Id: m_menu.c 17 2005-07-23 18:54:30Z fraggle $"; #include #include @@ -1769,21 +1772,24 @@ void M_Drawer (void) y = 100 - M_StringHeight(messageString)/2; while(*(messageString+start)) { + int foundnewline = 0; + for (i = 0;i < strlen(messageString+start);i++) if (*(messageString+start+i) == '\n') { memset(string,0,40); strncpy(string,messageString+start,i); + foundnewline = 1; start += i+1; break; } - if (i == strlen(messageString+start)) + if (!foundnewline) { strcpy(string,messageString+start); - start += i; + start += strlen(string); } - + x = 160 - M_StringWidth(string)/2; M_WriteText(x,y,string); y += SHORT(hu_font[0]->height); -- cgit v1.2.3