mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-25 21:02:26 +00:00
[Hotfix] Instance GetUnusedInstanceID crash fox
This commit is contained in:
parent
7122ac33b2
commit
5d133a2b47
@ -174,12 +174,12 @@ bool Database::GetUnusedInstanceID(uint16 &instance_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
// check that id is within limits
|
||||
if (Strings::ToInt(row[0]) <= max_instance_id) {
|
||||
instance_id = Strings::ToInt(row[0]);
|
||||
return true;
|
||||
for (auto row : results) {
|
||||
// check that id is within limits
|
||||
if (row[0] && Strings::ToInt(row[0]) <= max_instance_id) {
|
||||
instance_id = Strings::ToInt(row[0]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// unhandled situation - should not reach here
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user