summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2007-02-14 19:11:03 +0000
committerSimon Howard2007-02-14 19:11:03 +0000
commit5a63dede9be5a1a126debc57be3075e565bc1248 (patch)
treebcb8ce9f69e05c9d5bc55eebbfb6ccca40a7c9c7
parent10547d4138a678caed15c546877679b65bf2e1db (diff)
downloadchocolate-doom-5a63dede9be5a1a126debc57be3075e565bc1248.tar.gz
chocolate-doom-5a63dede9be5a1a126debc57be3075e565bc1248.tar.bz2
chocolate-doom-5a63dede9be5a1a126debc57be3075e565bc1248.zip
Expand buffer length to fix bug on Windows with cycling character on the
quicksave screen. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 835
-rw-r--r--src/m_menu.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/m_menu.c b/src/m_menu.c
index 55a4a639..456d38ec 100644
--- a/src/m_menu.c
+++ b/src/m_menu.c
@@ -1804,42 +1804,42 @@ void M_Drawer (void)
static short y;
unsigned int i;
unsigned int max;
- char string[40];
+ char string[80];
char *name;
int start;
inhelpscreens = false;
-
// Horiz. & Vertically center string and print it.
if (messageToPrint)
{
start = 0;
- y = 100 - M_StringHeight(messageString)/2;
- while(*(messageString+start))
+ y = 100 - M_StringHeight(messageString) / 2;
+ while (messageString[start] != '\0')
{
int foundnewline = 0;
- for (i = 0;i < strlen(messageString+start);i++)
- if (*(messageString+start+i) == '\n')
+ for (i = 0; i < strlen(messageString + start); i++)
+ if (messageString[start + i] == '\n')
{
- memset(string,0,40);
- strncpy(string,messageString+start,i);
+ memset(string, 0, 40);
+ strncpy(string, messageString + start, i);
foundnewline = 1;
- start += i+1;
+ start += i + 1;
break;
}
if (!foundnewline)
{
- strcpy(string,messageString+start);
+ strcpy(string, messageString + start);
start += strlen(string);
}
- x = 160 - M_StringWidth(string)/2;
- M_WriteText(x,y,string);
+ x = 160 - M_StringWidth(string) / 2;
+ M_WriteText(x, y, string);
y += SHORT(hu_font[0]->height);
}
+
return;
}