aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/launcher.cpp12
1 files changed, 6 insertions, 6 deletions
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++;
}
}