From 4e89085e113c63de223cbcfe78cbff1b60f95199 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 27 Aug 2013 19:36:36 -0700 Subject: Fix bug with mapnames being falsy Fixes #7 --- src/login/login.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/login') diff --git a/src/login/login.cpp b/src/login/login.cpp index e09f96b..b0b3137 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -501,7 +501,7 @@ FString mmo_auth_tostr(const AuthData *p) p->ban_until_time); for (int i = 0; i < p->account_reg2_num; i++) - if (p->account_reg2[i].str[0]) + if (p->account_reg2[i].str) str += STRPRINTF("%s,%d ", p->account_reg2[i].str, p->account_reg2[i].value); @@ -541,7 +541,7 @@ bool extract(XString line, AuthData *ad) } // If a password is not encrypted, we encrypt it now. // A password beginning with ! and - in the memo field is our magic - if (ad->pass[0] != '!' && ad->memo[0] == '-') + if (!ad->pass.startswith('!') && ad->memo.startswith('-')) { XString pass = ad->pass; AccountPass plain = stringish(pass); -- cgit v1.2.3-60-g2f50