From 94c933fe4cf48af3afc5e2cf6487281b2b5c0071 Mon Sep 17 00:00:00 2001 From: Zaczero Date: Tue, 11 Apr 2017 18:24:19 +0200 Subject: [PATCH] Fixed rnd crash --- SharpLoader/Core/SourceRandomizer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SharpLoader/Core/SourceRandomizer.cs b/SharpLoader/Core/SourceRandomizer.cs index 78bd88f..ab52f67 100644 --- a/SharpLoader/Core/SourceRandomizer.cs +++ b/SharpLoader/Core/SourceRandomizer.cs @@ -304,7 +304,7 @@ private void Random(ref string str) } // Replace - str = str.Remove(tagIndex, tagLength + 1).Insert(tagIndex, Inject(outputValue)); + str = str.Remove(tagIndex, tagLength + 1).Insert(tagIndex, outputValue.ToString()); } } @@ -909,7 +909,7 @@ private void Encrypt(ref string str) arg = arg.Remove(0, 2); if (!int.TryParse(arg, NumberStyles.HexNumber, null, out rawValue)) { - throw new Exception($"invalid argument value: {str.Substring(tagIndex + 5, tagLength - 5)}"); + throw new Exception($"invalid argument value: {arg}"); } } // Dec @@ -917,7 +917,7 @@ private void Encrypt(ref string str) { if (!int.TryParse(arg, out rawValue)) { - throw new Exception($"invalid argument value: {str.Substring(tagIndex + 5, tagLength - 5)}"); + throw new Exception($"invalid argument value: {arg}"); } } }