aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-22 21:02:57 +0200
committerEinar Johan Trøan Sømåen2012-07-22 21:02:57 +0200
commit6fb641111f28d02714064ae193e39e4f1e60ce35 (patch)
treea731be25fc6705da982e4a140daf363ef3df86fa /engines
parenta549977cffae9a5f1be41d9b07d42908648e8f6d (diff)
downloadscummvm-rg350-6fb641111f28d02714064ae193e39e4f1e60ce35.tar.gz
scummvm-rg350-6fb641111f28d02714064ae193e39e4f1e60ce35.tar.bz2
scummvm-rg350-6fb641111f28d02714064ae193e39e4f1e60ce35.zip
WINTERMUTE: Use only alphanumerics in fallback-gameids.
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/detection.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 5e259f717d..85b8dcf429 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -27,6 +27,7 @@
#include "common/config-manager.h"
#include "common/error.h"
#include "common/fs.h"
+#include "common/util.h"
#include "engines/metaengine.h"
@@ -116,8 +117,8 @@ public:
Common::String name, caption;
if (WinterMuteEngine::getGameInfo(fslist, name, caption)) {
for (int32 i = 0; i < name.size(); i++) {
- // Replace spaces with underscores
- if (name[i] == ' ') {
+ // Replace spaces (and other non-alphanumerics) with underscores
+ if (!Common::isAlnum(name[i])) {
name.setChar('_', (uint32)i);
}
}