aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++;
}
}