mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-11 00:02:12 +00:00
GetFreeGrid should no longer crash when trying to #wpadd in a zone that has no grids
This commit is contained in:
1 parent
43ed5a325f
commit
7efccad13e
1 file changed
+1
-2
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user