mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-04 15:43:52 +00:00
GetFreeGrid should no longer crash when trying to #wpadd in a zone that has no grids
This commit is contained in:
parent
43ed5a325f
commit
7efccad13e
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user