We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85bf8e0 commit 20e4822Copy full SHA for 20e4822
lib/ram_filebuf.cpp
@@ -71,7 +71,7 @@ ram_filebuf::close()
71
ram_filebuf::pos_type
72
ram_filebuf::seekpos(pos_type sp, std::ios_base::openmode mode)
73
{
74
- if (sp >= 0 and sp < m_ram_file->size()) {
+ if (sp >= 0 and sp < (pos_type)m_ram_file->size()) {
75
setg(eback(), eback()+sp, egptr());
76
setp(pbase(), epptr());
77
pbump(pbase()+sp-pptr()); // pptr should be pbase() anyway after the setp call?
lib/sfstream.cpp
@@ -198,6 +198,7 @@ isfstream::close()
198
fail = !((std::filebuf*)m_streambuf)->close();
199
}
200
201
+ if (fail) this->setstate(std::ios::failbit);
202
203
204
isfstream&
0 commit comments