From 4a67e7fdd4889d1316d36d81454aae26273fc396 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 7 Feb 2022 13:21:45 -0500 Subject: [PATCH] fix: break out of loop, not switch --- ChatTwo/Configuration.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ChatTwo/Configuration.cs b/ChatTwo/Configuration.cs index a128110..dbb0eee 100755 --- a/ChatTwo/Configuration.cs +++ b/ChatTwo/Configuration.cs @@ -59,7 +59,8 @@ internal class Configuration : IPluginConfiguration { } public void Migrate() { - while (this.Version < LatestVersion) { + var loop = true; + while (loop && this.Version < LatestVersion) { switch (this.Version) { case 1: { this.Version = 2; @@ -80,6 +81,7 @@ internal class Configuration : IPluginConfiguration { break; default: PluginLog.Warning($"Couldn't migrate config version {this.Version}"); + loop = false; break; } }