Fix UB in the playturn_network_adapter class
Comparing iterators from distinct containers is undefined behavior.
This commit is contained in:
parent
88ca728080
commit
446de553bd
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ void playturn_network_adapter::read_from_network()
|
|||
bool playturn_network_adapter::is_at_end()
|
||||
{
|
||||
assert(!data_.empty());
|
||||
if (data_.size() > 1) return false;
|
||||
return this->next_ == data_.back().ordered_end();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue