Merge pull request #403 from CopernicaMarketingSoftware/fix/segfault

Fix: cannot call size() on a moved-from Field
This commit is contained in:
Emiel Bruijntjes 2021-07-01 14:06:22 +02:00 committed by GitHub
commit 6df80e3b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
}
}