Avoid potential undefined behavior in WMO header parsing, don't reuse moved string

This commit is contained in:
Dan Paulat 2022-01-25 21:39:48 -06:00
parent ecf5b1f5f0
commit b96455190f

View file

@ -171,7 +171,7 @@ bool WmoHeader::Parse(std::istream& is)
while (wmoTokens >> token)
{
wmoTokenList.push_back(std::move(token));
wmoTokenList.push_back(token);
}
if (wmoTokenList.size() < 3 || wmoTokenList.size() > 4)