Skip to content

Commit 20e4822

Browse files
committed
@mpetri comment on issue #39
1 parent 85bf8e0 commit 20e4822

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/ram_filebuf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ram_filebuf::close()
7171
ram_filebuf::pos_type
7272
ram_filebuf::seekpos(pos_type sp, std::ios_base::openmode mode)
7373
{
74-
if (sp >= 0 and sp < m_ram_file->size()) {
74+
if (sp >= 0 and sp < (pos_type)m_ram_file->size()) {
7575
setg(eback(), eback()+sp, egptr());
7676
setp(pbase(), epptr());
7777
pbump(pbase()+sp-pptr()); // pptr should be pbase() anyway after the setp call?

lib/sfstream.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ isfstream::close()
198198
fail = !((std::filebuf*)m_streambuf)->close();
199199
}
200200
}
201+
if (fail) this->setstate(std::ios::failbit);
201202
}
202203

203204
isfstream&

0 commit comments

Comments
 (0)