mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 22:04:24 +00:00
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
@ -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…
x
Reference in New Issue
Block a user