From 6fb641111f28d02714064ae193e39e4f1e60ce35 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Sun, 22 Jul 2012 21:02:57 +0200 Subject: WINTERMUTE: Use only alphanumerics in fallback-gameids. --- engines/wintermute/detection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') 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); } } -- cgit v1.2.3