set badbit if stream is corrupt
This commit is contained in:
parent
8dc6c36e36
commit
c4ab516efe
|
@ -185,7 +185,7 @@ void Pdu::iStream(Stream stream)
|
|||
|
||||
// abort if the remaining PDU length isn't available
|
||||
if (!stream->good() || stream->available() < hd_length)
|
||||
return stream->setstate(std::ios_base::failbit);
|
||||
return stream->setstate(std::ios_base::badbit);
|
||||
|
||||
// create a stream buffer for the header and data
|
||||
stream_ = Stream(new bufferstream(stream->data(), hd_length));
|
||||
|
|
Loading…
Reference in New Issue