summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2005-07-23 18:54:30 +0000
committerSimon Howard2005-07-23 18:54:30 +0000
commit1df9202dbf484818cb46ba94e30b37af5a1cce60 (patch)
tree2566f82aa07eaf0c083b3ed06190f9a8d7672aa4 /src
parent50a842586467d4311ad59cc34aa8076ff619a8e4 (diff)
downloadchocolate-doom-1df9202dbf484818cb46ba94e30b37af5a1cce60.tar.gz
chocolate-doom-1df9202dbf484818cb46ba94e30b37af5a1cce60.tar.bz2
chocolate-doom-1df9202dbf484818cb46ba94e30b37af5a1cce60.zip
Fix quit prompt not displayed properly
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 17
Diffstat (limited to 'src')
-rw-r--r--src/m_menu.c16
1 files changed, 11 insertions, 5 deletions
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 <unistd.h>
#include <sys/types.h>
@@ -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);