[Scummvm-cvs-logs] SF.net SVN: scummvm:[49344] scummvm/trunk/engines/sci/engine/kstring.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon May 31 11:21:15 CEST 2010
Revision: 49344
http://scummvm.svn.sourceforge.net/scummvm/?rev=49344&view=rev
Author: m_kiewitz
Date: 2010-05-31 09:21:15 +0000 (Mon, 31 May 2010)
Log Message:
-----------
SCI: when getting invalid chars in kReadNumber don't error() out, but create a warning - we get invalid chars in the intro of lsl5, cause currently unknown
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kstring.cpp
Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp 2010-05-31 08:11:49 UTC (rev 49343)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2010-05-31 09:21:15 UTC (rev 49344)
@@ -151,9 +151,13 @@
source++;
}
while (*source) {
+ if ((*source < '0') || (*source > '9')) {
+ // TODO: this happens in lsl5 right in the intro -> we get '1' '3' 0xCD 0xCD 0xCD 0xCD 0xCD
+ // find out why this happens and fix it
+ warning("Invalid character in kReadNumber input");
+ break;
+ }
result *= 10;
- if ((*source < '0') || (*source > '9'))
- error("Invalid character in kReadNumber input");
result += *source - 0x30;
source++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list