Skip to content

Commit 7097de1

Browse files
committed
Fix a crash I suppose
1 parent c2ce280 commit 7097de1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Oculus Downgrader/Program.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void Main(string[] args)
4949
// Handle oculus uri scheme
5050
Logger.SetLogFile(AppDomain.CurrentDomain.BaseDirectory + "Log.log");
5151
SetupExceptionHandlers();
52-
DowngradeManager.updater = new Updater("1.11.43", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus Downgrader", Assembly.GetExecutingAssembly().Location);
52+
DowngradeManager.updater = new Updater("1.11.44", "https://github.com/ComputerElite/Oculus-downgrader", "Oculus Downgrader", Assembly.GetExecutingAssembly().Location);
5353
Logger.LogRaw("\n\n");
5454
Logger.Log("Starting Oculus Downgrader version " + DowngradeManager.updater.version);
5555
if (args.Length == 1 && args[0] == "--update")
@@ -1240,12 +1240,13 @@ public void StoreSearch(string autoterm = "")
12401240
foreach (KeyValuePair<string,string> pair in nameIdRaw)
12411241
{
12421242
int increment = 0;
1243-
while (nameId.ContainsKey(pair.Value + (increment == 0 ? "" : " " + increment)))
1243+
string name;
1244+
while (nameId.ContainsKey(name = (pair.Value + (increment == 0 ? "" : " " + increment)).ToLower()))
12441245
{
12451246
increment++;
12461247
}
1247-
string name = pair.Value + (increment == 0 ? "" : " " + increment);
1248-
nameId.Add(name.ToLower(), pair.Key);
1248+
1249+
nameId.Add(name, pair.Key);
12491250
Logger.Log(" - " + name);
12501251
Console.WriteLine(" - " + name);
12511252
if (name.ToLower() == term.ToLower())

0 commit comments

Comments
 (0)