Check for -1

This commit is contained in:
Noah Pilarski 2022-08-07 19:09:37 -04:00
parent 243452dca3
commit 5b2e66a8ba

View File

@ -101,7 +101,8 @@ namespace NewHorizons.Patches
break;
default:
var key = RemoteHandler.GetPlatformIDKey(id);
switch (key.Substring(0, key.IndexOf("_")))
var _ = key.IndexOf("_");
switch ((_ == -1) ? key : key.Substring(0, _))
{
case "SS":
__result = "SolarSystem";