Fixes creating new account.

This commit is contained in:
hondacrx
2024-02-22 16:45:38 -05:00
parent ae2c3c18c8
commit 41e228be3c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ namespace Framework.Cryptography
{ {
byte[] fix = new byte[65]; byte[] fix = new byte[65];
fix[64] = 1; fix[64] = 1;
x -= new BigInteger(fix); x -= new BigInteger(fix, true);
} }
return x % (N - 1); return x % (N - 1);
+1 -1
View File
@@ -45,7 +45,7 @@ namespace Game
if (withGameAccount) if (withGameAccount)
{ {
gameAccountName = newAccountId + "#1"; 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); Global.AccountMgr.CreateAccount(gameAccountName, gameAccountPassword.ToUpper(), email, newAccountId, 1);
} }