diff options
Diffstat (limited to 'src/game/Level0.cpp')
-rw-r--r-- | src/game/Level0.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/Level0.cpp b/src/game/Level0.cpp index 3bdfaf1ba3d..c8e39b134a8 100644 --- a/src/game/Level0.cpp +++ b/src/game/Level0.cpp @@ -243,13 +243,13 @@ bool ChatHandler::HandleAccountAddonCommand(const char* args) uint32 account_id = m_session->GetAccountId(); - int lev=atoi(szExp); //get int anyway (0 if error) - if(lev < 0 || lev > sWorld.getConfig(CONFIG_EXPANSION)) - return false; + int expansion=atoi(szExp); //get int anyway (0 if error) + if(expansion < 0 || expansion > sWorld.getConfig(CONFIG_EXPANSION)) + return false; // No SQL injection - loginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'",lev,account_id); - PSendSysMessage(LANG_ACCOUNT_ADDON,lev); + loginDatabase.PExecute("UPDATE account SET expansion = '%d' WHERE id = '%u'", expansion, account_id); + PSendSysMessage(LANG_ACCOUNT_ADDON, expansion); return true; } |