diff options
author | Filippos Karapetis | 2011-10-10 02:12:48 +0300 |
---|---|---|
committer | Filippos Karapetis | 2011-10-10 02:12:48 +0300 |
commit | 97eb3546724bda5175fcd854326e8427b2365eef (patch) | |
tree | a7a83265846325d24abed609e8dae4f6be343600 /engines/agi | |
parent | 121bef4f79e23ad8ae569170d8375391f89b2aee (diff) | |
download | scummvm-rg350-97eb3546724bda5175fcd854326e8427b2365eef.tar.gz scummvm-rg350-97eb3546724bda5175fcd854326e8427b2365eef.tar.bz2 scummvm-rg350-97eb3546724bda5175fcd854326e8427b2365eef.zip |
AGI: Fixed bug #3420859 - "AGI: SQ0 - Scummvm Crash"
The length requested in this case is 250, which overflows a char variable
Diffstat (limited to 'engines/agi')
-rw-r--r-- | engines/agi/text.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp index 502db4bdba..d5027588f9 100644 --- a/engines/agi/text.cpp +++ b/engines/agi/text.cpp @@ -224,7 +224,8 @@ void AgiEngine::printTextConsole(const char *msg, int x, int y, int len, int fg, * Based on GBAGI implementation with permission from the author */ char *AgiEngine::wordWrapString(const char *s, int *len) { - char *outStr, *msgBuf, maxWidth = *len; + char *outStr, *msgBuf; + int maxWidth = *len; const char *pWord; int lnLen, wLen; |