v3.4.3.2
- Fixed rare SteamCMD output string exception
This commit is contained in:
parent
53af12fdae
commit
e03f0e68d1
3 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
<UseWindowsForms>True</UseWindowsForms>
|
<UseWindowsForms>True</UseWindowsForms>
|
||||||
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
|
<ApplicationIcon>Resources\ini.ico</ApplicationIcon>
|
||||||
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
|
||||||
<Version>3.4.3.1</Version>
|
<Version>3.4.3.2</Version>
|
||||||
<PackageIcon>Resources\ini.ico</PackageIcon>
|
<PackageIcon>Resources\ini.ico</PackageIcon>
|
||||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||||
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
|
<Copyright>2021, pointfeev (https://github.com/pointfeev)</Copyright>
|
||||||
|
|
|
@ -224,7 +224,7 @@ internal static class SteamCMD
|
||||||
output = await Run(appId) ?? "";
|
output = await Run(appId) ?? "";
|
||||||
int openBracket = output.IndexOf("{");
|
int openBracket = output.IndexOf("{");
|
||||||
int closeBracket = output.LastIndexOf("}");
|
int closeBracket = output.LastIndexOf("}");
|
||||||
if (!string.IsNullOrEmpty(output) && openBracket != -1 && closeBracket != -1)
|
if (openBracket != -1 && closeBracket != -1 && closeBracket > openBracket)
|
||||||
{
|
{
|
||||||
output = $"\"{appId}\"\n" + output[openBracket..(1 + closeBracket)];
|
output = $"\"{appId}\"\n" + output[openBracket..(1 + closeBracket)];
|
||||||
output = output.Replace("ERROR! Failed to install app '4' (Invalid platform)", "");
|
output = output.Replace("ERROR! Failed to install app '4' (Invalid platform)", "");
|
||||||
|
|
|
@ -18,8 +18,8 @@ internal static class ExceptionHandler
|
||||||
for (int i = 0; i < Math.Min(stackTrace.Length, 3); i++)
|
for (int i = 0; i < Math.Min(stackTrace.Length, 3); i++)
|
||||||
{
|
{
|
||||||
string line = stackTrace[i];
|
string line = stackTrace[i];
|
||||||
int atNum = line.LastIndexOf("at ");
|
int atNum = line.IndexOf("at ");
|
||||||
int inNum = line.LastIndexOf("in ");
|
int inNum = line.IndexOf("in ");
|
||||||
int ciNum = line.LastIndexOf(@"CreamInstaller\");
|
int ciNum = line.LastIndexOf(@"CreamInstaller\");
|
||||||
int lineNum = line.LastIndexOf(":line ");
|
int lineNum = line.LastIndexOf(":line ");
|
||||||
if (line is not null && atNum != -1)
|
if (line is not null && atNum != -1)
|
||||||
|
|
Loading…
Reference in a new issue