Fix: cannot call size() on a moved-from Field

Solution is to swap the statements.

This was regressed in 7532f5769d.
This commit is contained in:
Raoul Wols 2021-07-01 13:48:10 +02:00
parent 134ed73498
commit 3649f41219
No known key found for this signature in database
GPG Key ID: 9FFE06A0F6AAA2DF
1 changed files with 3 additions and 3 deletions

View File

@ -27,11 +27,11 @@ Table::Table(InBuffer &frame)
auto field = Field::decode(frame);
if (!field) continue;
// add field
_fields[name] = std::move(field);
// subtract size
bytesToRead -= (uint32_t)field->size();
// add field
_fields[name] = std::move(field);
}
}