[Scummvm-cvs-logs] CVS: scummvm/base gameDetector.cpp,1.16,1.17
Max Horn
fingolfin at users.sourceforge.net
Thu Oct 9 04:16:06 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen walk.cpp,NONE,1.1 walk.h,NONE,1.1 cutaway.cpp,1.11,1.12 graphics.cpp,1.11,1.12 graphics.h,1.10,1.11 logic.cpp,1.24,1.25 logic.h,1.14,1.15 resource.h,1.8,1.9 structs.h,1.3,1.4 module.mk,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: web press.php,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv19569/base
Modified Files:
gameDetector.cpp
Log Message:
make khaleks correct fix a bit nicer; and add similar safety nets to the other parser...() methods
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- gameDetector.cpp 9 Oct 2003 06:52:28 -0000 1.16
+++ gameDetector.cpp 9 Oct 2003 11:15:54 -0000 1.17
@@ -500,6 +500,9 @@
}
int GameDetector::parseGraphicsMode(const String &str) {
+ if (str.isEmpty())
+ return -1;
+
const char *s = str.c_str();
const GraphicsMode *gm = gfx_modes;
while (gm->name) {
@@ -513,6 +516,9 @@
}
Language GameDetector::parseLanguage(const String &str) {
+ if (str.isEmpty())
+ return UNK_LANG;
+
const char *s = str.c_str();
const LanguageDescription *l = languages;
while (l->name) {
@@ -525,6 +531,9 @@
}
Platform GameDetector::parsePlatform(const String &str) {
+ if (str.isEmpty())
+ return kPlatformUnknown;
+
const char *s = str.c_str();
if (!scumm_stricmp(s, "pc"))
return kPlatformPC;
@@ -539,7 +548,7 @@
}
int GameDetector::parseMusicDriver(const String &str) {
- if (str == String::emptyString)
+ if (str.isEmpty())
return -1;
const char *s = str.c_str();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen walk.cpp,NONE,1.1 walk.h,NONE,1.1 cutaway.cpp,1.11,1.12 graphics.cpp,1.11,1.12 graphics.h,1.10,1.11 logic.cpp,1.24,1.25 logic.h,1.14,1.15 resource.h,1.8,1.9 structs.h,1.3,1.4 module.mk,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: web press.php,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list