aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/graphics.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-02-03 17:06:45 +0000
committerNicola Mettifogo2008-02-03 17:06:45 +0000
commitfea63a51814f169150a472a7195b8872f5929c79 (patch)
treee0d1ce88571679ac7bfa5a95a31a9f6f4d0ee68a /engines/parallaction/graphics.cpp
parent4c117772bd2dc6866b61d498848cf178a659218f (diff)
downloadscummvm-rg350-fea63a51814f169150a472a7195b8872f5929c79.tar.gz
scummvm-rg350-fea63a51814f169150a472a7195b8872f5929c79.tar.bz2
scummvm-rg350-fea63a51814f169150a472a7195b8872f5929c79.zip
Fixed maximum token length for the parser.
svn-id: r30776
Diffstat (limited to 'engines/parallaction/graphics.cpp')
-rw-r--r--engines/parallaction/graphics.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index dd5ae4349b..23361cfcde 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -699,11 +699,11 @@ void Gfx::getStringExtent(char *text, uint16 maxwidth, int16* width, int16* heig
uint16 blankWidth = _font->getStringWidth(" ");
uint16 tokenWidth = 0;
- char token[40];
+ char token[MAX_TOKEN_LEN];
while (strlen(text) != 0) {
- text = parseNextToken(text, token, 40, " ", true);
+ text = parseNextToken(text, token, MAX_TOKEN_LEN, " ", true);
tokenWidth = _font->getStringWidth(token);
w += tokenWidth;
@@ -969,14 +969,14 @@ void Gfx::drawWrappedText(Graphics::Surface* surf, char *text, byte color, int16
uint16 blankWidth = _font->getStringWidth(" ");
uint16 tokenWidth = 0;
- char token[40];
+ char token[MAX_TOKEN_LEN];
if (wrapwidth == -1)
wrapwidth = _vm->_screenWidth;
while (strlen(text) > 0) {
- text = parseNextToken(text, token, 40, " ", true);
+ text = parseNextToken(text, token, MAX_TOKEN_LEN, " ", true);
if (!scumm_stricmp(token, "%p")) {
lines++;