mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 00:57:15 +00:00
ZoneDatabase::GetKarma crash fix
This commit is contained in:
+4
-2
@@ -2953,11 +2953,13 @@ uint32 ZoneDatabase::GetKarma(uint32 acct_id)
|
|||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
|
|
||||||
return atoi(row[0]);
|
return atoi(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void ZoneDatabase::UpdateKarma(uint32 acct_id, uint32 amount)
|
void ZoneDatabase::UpdateKarma(uint32 acct_id, uint32 amount)
|
||||||
{
|
{
|
||||||
std::string query = StringFormat("UPDATE account SET karma = %i WHERE id = %i", amount, acct_id);
|
std::string query = StringFormat("UPDATE account SET karma = %i WHERE id = %i", amount, acct_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user