Skip to content
This repository was archived by the owner on Oct 5, 2019. It is now read-only.

Commit 94c933f

Browse files
author
Zaczero
committed
Fixed rnd crash
1 parent 7f977f1 commit 94c933f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

SharpLoader/Core/SourceRandomizer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ private void Random(ref string str)
304304
}
305305

306306
// Replace
307-
str = str.Remove(tagIndex, tagLength + 1).Insert(tagIndex, Inject(outputValue));
307+
str = str.Remove(tagIndex, tagLength + 1).Insert(tagIndex, outputValue.ToString());
308308
}
309309
}
310310

@@ -909,15 +909,15 @@ private void Encrypt(ref string str)
909909
arg = arg.Remove(0, 2);
910910
if (!int.TryParse(arg, NumberStyles.HexNumber, null, out rawValue))
911911
{
912-
throw new Exception($"invalid argument value: {str.Substring(tagIndex + 5, tagLength - 5)}");
912+
throw new Exception($"invalid argument value: {arg}");
913913
}
914914
}
915915
// Dec
916916
else
917917
{
918918
if (!int.TryParse(arg, out rawValue))
919919
{
920-
throw new Exception($"invalid argument value: {str.Substring(tagIndex + 5, tagLength - 5)}");
920+
throw new Exception($"invalid argument value: {arg}");
921921
}
922922
}
923923
}

0 commit comments

Comments
 (0)