The following:
|
_ostream->rdbuf()->sputn(data, static_cast<std::streamsize>(size)); |
should error out (I guess
error(ReaderError::DataOverflow);?) if the
sputn call returns something other than
size. Same for the other
sputn calls.
This error is also not feasible to detect outside of the library. ofstream::good() doesn't work, it returns true even if sputn failed to complete fully.
The following:
bitsery/include/bitsery/adapter/stream.h
Line 317 in 94f7ada
should error out (I guess
error(ReaderError::DataOverflow);?) if thesputncall returns something other thansize. Same for the othersputncalls.This error is also not feasible to detect outside of the library.
ofstream::good()doesn't work, it returns true even ifsputnfailed to complete fully.