[chocolate-doom] 11/83: Fix quit prompt not displayed properly

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:06:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.0.1
in repository chocolate-doom.

commit 1df9202dbf484818cb46ba94e30b37af5a1cce60
Author: Simon Howard <fraggle at gmail.com>
Date:   Sat Jul 23 18:54:30 2005 +0000

    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(-)

diff --git a/src/m_menu.c b/src/m_menu.c
index 7640529..4d9adf7 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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list