GetFreeGrid should no longer crash when trying to #wpadd in a zone that has no grids

This commit is contained in:
Natedog2012 committed 2016-02-02 01:53:30 -08:00
1 parent 43ed5a325f
commit 7efccad13e
1 file changed
+1 -2
+1 -2
View File
@@ -1186,8 +1186,7 @@ uint32 ZoneDatabase::GetFreeGrid(uint16 zoneid) {
return 0;
auto row = results.begin();
uint32 freeGridID = 1;
freeGridID = atoi(row[0]) + 1;
uint32 freeGridID = row[0] ? atoi(row[0]) + 1 : 1;
return freeGridID;
}