1
0
Fork 0

use std::isteam ignore for loop efficiency

This commit is contained in:
Kevin Matz 2021-08-18 15:46:07 -04:00
parent 507a2352ff
commit 68020b0213
1 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,8 @@ void transport::iStream(PDU::Stream stream)
* the preamble size and postamble size provided. ... ignoring any extra
* octets in the preamble or postamble.
*/
for(int i = PREAMBLE_MINIMUM_SIZE; i < length; i++)
stream->readType<uint8_t>();
if (length > PREAMBLE_MINIMUM_SIZE)
stream->ignore((length - PREAMBLE_MINIMUM_SIZE));
root.iStream(stream);
}