Fix issue with SharedDatabase::LoadCharacterInspectMessage

This commit is contained in:
Michael Cook (mackal) 2015-01-12 16:57:41 -05:00
parent a6148565e5
commit 5cb2b14645

View File

@ -1979,7 +1979,7 @@ void SharedDatabase::LoadCharacterInspectMessage(uint32 character_id, InspectMes
std::string query = StringFormat("SELECT `inspect_message` FROM `character_inspect_messages` WHERE `id` = %u LIMIT 1", character_id);
auto results = QueryDatabase(query);
auto row = results.begin();
memcpy(message, "", sizeof(InspectMessage_Struct));
memset(message, '\0', sizeof(InspectMessage_Struct));
for (auto row = results.begin(); row != results.end(); ++row) {
memcpy(message, row[0], sizeof(InspectMessage_Struct));
}