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

Commit

Permalink
Fixed rnd crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Apr 11, 2017
1 parent 7f977f1 commit 94c933f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SharpLoader/Core/SourceRandomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down Expand Up @@ -909,15 +909,15 @@ 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
else
{
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}");
}
}
}
Expand Down

0 comments on commit 94c933f

Please sign in to comment.