Fix string split in upgrade check so that it works

This commit is contained in:
Lucas Nicodemus 2015-04-13 11:31:13 -06:00
parent 37b5a52fdb
commit 08fae75c0c

View file

@ -392,7 +392,7 @@ namespace TShockAPI.DB
/// <param name="password">string password - the raw user password (unhashed) to upgrade</param>
internal void upgradePasswordWorkFactor(string password) {
// If the destination work factor is not greater, we won't upgrade it or re-hash it
int currentWorkFactor = Convert.ToInt32(this.Password.Split(new Char[] {'$'})[1]);
int currentWorkFactor = Convert.ToInt32((this.Password.Split('$')[2]));
if (currentWorkFactor < TShock.Config.WorkFactor) {
try {