Crash fixes oh my

This commit is contained in:
KimLS
2014-08-28 03:47:28 -07:00
parent 467afc86af
commit ca84040a39
4 changed files with 10 additions and 2 deletions
+7
View File
@@ -1632,6 +1632,13 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
int tempid = 0;
int counter = 0;
if(result && mysql_field_count(getMySQL()) <= SPELL_LOAD_FIELD_COUNT) {
_log(SPELLS__LOAD_ERR, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
mysql_free_result(result);
return;
}
while (row = mysql_fetch_row(result)) {
tempid = atoi(row[0]);
if(tempid >= max_spells) {