diff options
author | Matthew Hoops | 2009-12-19 02:12:17 +0000 |
---|---|---|
committer | Matthew Hoops | 2009-12-19 02:12:17 +0000 |
commit | 26a5c1c3a5ea76a92ebe60f074c3fbfa64a06fa7 (patch) | |
tree | d89db5f5e0f72a27983bbb9e26fc952c11e203f9 | |
parent | 144bd33ec4f6499cbad469a885258f56edc4fdc1 (diff) | |
download | scummvm-rg350-26a5c1c3a5ea76a92ebe60f074c3fbfa64a06fa7.tar.gz scummvm-rg350-26a5c1c3a5ea76a92ebe60f074c3fbfa64a06fa7.tar.bz2 scummvm-rg350-26a5c1c3a5ea76a92ebe60f074c3fbfa64a06fa7.zip |
Fix segfault when quitting. static const Common::String's shouldn't be used.
svn-id: r46416
-rw-r--r-- | engines/sci/engine/game.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 31f001aa05..848e6c5bf7 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -43,10 +43,10 @@ namespace Sci { struct OldNewIdTableEntry { - Common::String oldId; - Common::String newId; + const char *oldId; + const char *newId; bool demo; - Common::String demoCheckFile; // if not empty and it doesn't exist, the demo flag is set + const char *demoCheckFile; // if not empty and it doesn't exist, the demo flag is set }; static const OldNewIdTableEntry s_oldNewTable[] = { @@ -101,14 +101,14 @@ const char *convertSierraGameId(const char *gameName, uint32 *gameFlags) { // TODO: SCI32 IDs - for (const OldNewIdTableEntry *cur = s_oldNewTable; !cur->oldId.empty(); ++cur) { + for (const OldNewIdTableEntry *cur = s_oldNewTable; cur->oldId[0]; ++cur) { if (sierraId == cur->oldId) { if (cur->demo) *gameFlags |= ADGF_DEMO; - if (!cur->demoCheckFile.empty()) - if (!Common::File::exists(cur->demoCheckFile.c_str())) + if (cur->demoCheckFile[0]) + if (!Common::File::exists(cur->demoCheckFile)) *gameFlags |= ADGF_DEMO; - return cur->newId.c_str(); + return cur->newId; } } |