From 584ba2ba5154887d070313823bf4861192ee7f7d Mon Sep 17 00:00:00 2001 From: Aria Stewart Date: Sat, 7 Jul 2018 00:54:30 -0400 Subject: [PATCH] Support for MacOS Mojave --- Sparkles/InstallationInfo.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Sparkles/InstallationInfo.cs b/Sparkles/InstallationInfo.cs index 2b4a6769..c3b47bc1 100644 --- a/Sparkles/InstallationInfo.cs +++ b/Sparkles/InstallationInfo.cs @@ -72,8 +72,9 @@ namespace Sparkles { // Parse the version number between the periods (e.g. "10.12.1" -> 12) output = output.Substring (output.IndexOf (".") + 1); - output = output.Substring (0, output.LastIndexOf (".")); - + if (output.LastIndexOf (".") != -1) { + output = output.Substring (0, output.LastIndexOf (".")); + } string release = "Unreleased Version"; switch (int.Parse (output)) { @@ -84,6 +85,7 @@ namespace Sparkles { case 11: release = "El Capitan"; break; case 12: release = "Sierra"; break; case 13: release = "High Sierra"; break; + case 14: release = "Mojave"; break; } return string.Format ("{0} ({1})", version, release);