aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2006-09-21 11:42:44 +0000
committerEugene Sandulenko2006-09-21 11:42:44 +0000
commit965cfe40086df3274e8228a526a624b96bfc5e03 (patch)
tree197c52c9eee19d017957edd315aa96ad03363ffe
parent9d7e5f6f85cd5a73d7db79cb98a0a11650cd74ef (diff)
downloadscummvm-rg350-965cfe40086df3274e8228a526a624b96bfc5e03.tar.gz
scummvm-rg350-965cfe40086df3274e8228a526a624b96bfc5e03.tar.bz2
scummvm-rg350-965cfe40086df3274e8228a526a624b96bfc5e03.zip
Fix bug #1562795: "Bug with auto-generated game IDs"
svn-id: r23960
-rw-r--r--NEWS1
-rw-r--r--gui/launcher.cpp12
2 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index d33c1a8cdc..261fd3caf0 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
0.9.1 (????-??-??)
General:
- Fixed potential garbage and/or crash in debug console.
+ - Removed restriction on 27 games per game id when added via launcher.
SCUMM:
- Improved support for international versions of HE games.
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index a41615668c..eadd2ab78c 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -649,13 +649,13 @@ void LauncherDialog::addGame() {
// are *adding* a game to the config, not replacing).
String domain(result.gameid);
if (ConfMan.hasGameDomain(domain)) {
- char suffix = 'a';
- domain += suffix;
+ int suffixN = 1;
+ char suffix[16];
+
while (ConfMan.hasGameDomain(domain)) {
- assert(suffix < 'z');
- domain.deleteLastChar();
- suffix++;
- domain += suffix;
+ snprintf(suffix, 16, "-%d", suffixN);
+ domain = result.gameid + suffix;
+ suffixN++;
}
}