X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fio%2Frecord.cpp;h=4cc5b898bab50e377d71df9b8017cd2932a3dc91;hb=e0713d1539887566e0ea7d85942c305ec727c9dd;hp=422244e0021e2d06216df0f31e2ea7f626ee914b;hpb=f8d1606423c351f2003ce18258ef047e0d2af326;p=cassiopeia.git diff --git a/src/io/record.cpp b/src/io/record.cpp index 422244e..4cc5b89 100644 --- a/src/io/record.cpp +++ b/src/io/record.cpp @@ -31,7 +31,7 @@ void sendCommand( RecordHeader& head, const std::string& data, std::shared_ptr(0xF000), data.size() - pos); head.payloadLength = toTransfer; @@ -47,7 +47,7 @@ void sendCommand( RecordHeader& head, const std::string& data, std::shared_ptrreadLine() ); + payload = parseCommand( head2, io->readLine() ); + if(!head2.isFollowupOf(head)){ + throw std::runtime_error("Error, header of follow up chunk was malformed"); + } + head = head2; } return all; }