[Scummvm-cvs-logs] SF.net SVN: scummvm:[49355] scummvm/trunk/engines/sci/engine/kstring.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Mon May 31 15:52:07 CEST 2010
Revision: 49355
http://scummvm.svn.sourceforge.net/scummvm/?rev=49355&view=rev
Author: m_kiewitz
Date: 2010-05-31 13:52:07 +0000 (Mon, 31 May 2010)
Log Message:
-----------
SCI: break on anything, warn on anything but spaces in kReadNumber
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 13:09:24 UTC (rev 49354)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2010-05-31 13:52:07 UTC (rev 49355)
@@ -151,16 +151,14 @@
source++;
}
while (*source) {
- if (*source == ' ') {
- source++; // skip spaces - happens in lsl3 intro
- // TODO: find the cause for those spaces. ssci breaks when encountering spaces, but we even get a leading
- // space in lsl3 (" -97 ") which would actually mean we need to return 0
- continue;
- }
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");
+ // Sierras atoi stopped processing at anything different than number
+ // Sometimes the input has a trailing space, that's fine (example: lsl3)
+ if (*source != ' ') {
+ // 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;
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