Fixed seeking for simultaneous in- and output

This commit is contained in:
Bob Polis 2022-12-12 19:04:05 +01:00
parent b7112f0d23
commit 03ccac4d1f

View File

@ -72,7 +72,8 @@ std::streambuf::pos_type sc::io::memstreambuf::seekoff(std::streambuf::off_type
break;
}
return gptr() - _mem;
} else if (which & std::ios::out) { // writing
}
if (which & std::ios::out) { // writing
switch (dir) { // TODO
case std::ios::beg:
break;
@ -92,7 +93,8 @@ std::streambuf::pos_type sc::io::memstreambuf::seekpos(std::streambuf::pos_type
if (pos < 0 || static_cast<size_t>(pos) > _size) return EOF;
setg(_mem, _mem + pos, _mem + _size);
return pos;
} else if (which & std::ios::out) {
}
if (which & std::ios::out) {
// TODO
return pos;
}