small additional tweak

This commit is contained in:
Robin Müller 2022-10-04 23:04:28 +02:00
parent d1630cdc4c
commit 1c53b60442
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC

View File

@ -24,6 +24,9 @@ ReturnValue_t DleParser::passData(const uint8_t* data, size_t len) {
ReturnValue_t DleParser::parseRingBuf(size_t& readSize) { ReturnValue_t DleParser::parseRingBuf(size_t& readSize) {
ctx.setType(DleParser::ContextType::NONE); ctx.setType(DleParser::ContextType::NONE);
size_t availableData = decodeRingBuf.getAvailableReadData(); size_t availableData = decodeRingBuf.getAvailableReadData();
if(availableData == 0) {
return NO_PACKET_FOUND;
}
if (availableData > encodedBuf.second) { if (availableData > encodedBuf.second) {
ErrorInfo info; ErrorInfo info;
info.len = decodeRingBuf.getAvailableReadData(); info.len = decodeRingBuf.getAvailableReadData();