diff --git a/Source/Framework/Cryptography/SRP6.cs b/Source/Framework/Cryptography/SRP6.cs index 2e4b70c07..5903f2727 100644 --- a/Source/Framework/Cryptography/SRP6.cs +++ b/Source/Framework/Cryptography/SRP6.cs @@ -330,7 +330,7 @@ namespace Framework.Cryptography { byte[] fix = new byte[65]; fix[64] = 1; - x -= new BigInteger(fix); + x -= new BigInteger(fix, true); } return x % (N - 1); diff --git a/Source/Game/Accounts/BNetAccountManager.cs b/Source/Game/Accounts/BNetAccountManager.cs index 9f2b0004e..a568f2021 100644 --- a/Source/Game/Accounts/BNetAccountManager.cs +++ b/Source/Game/Accounts/BNetAccountManager.cs @@ -45,7 +45,7 @@ namespace Game if (withGameAccount) { gameAccountName = newAccountId + "#1"; - string gameAccountPassword = password.Substring(0, 16); + string gameAccountPassword = password.Substring(0, Math.Min(16, password.Length)); Global.AccountMgr.CreateAccount(gameAccountName, gameAccountPassword.ToUpper(), email, newAccountId, 1); }