From b54411e53316d7d91e55611b50340e75c0396bc4 Mon Sep 17 00:00:00 2001 From: KimLS Date: Fri, 24 Oct 2014 19:05:04 -0700 Subject: [PATCH] Fix for not loading some account data on character load --- zone/client_packet.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index efc8a5d8a..d929118b0 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1374,10 +1374,9 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) query = StringFormat("SELECT `status`, `name`, `lsaccount_id`, `gmspeed`, `revoked`, `hideme` FROM `account` WHERE `id` = %u", this->AccountID()); auto results = database.QueryDatabase(query); for (auto row = results.begin(); row != results.end(); ++row) { - if (admin){ admin = atoi(row[0]); } - if (account_name){ strcpy(account_name, row[1]); } - if (lsaccountid && atoi(row[2]) > 0){ lsaccountid = atoi(row[2]); } - else{ lsaccountid = 0; } + admin = atoi(row[0]); + strncpy(account_name, row[1], 30); + lsaccountid = atoi(row[2]); gmspeed = atoi(row[3]); revoked = atoi(row[4]); gmhideme = atoi(row[5]);