Improve EmbedStream::reset error checking.

parent e2ecddf3
......@@ -1090,7 +1090,12 @@ void EmbedStream::reset()
str->reset();
// Might be a FilterStream that does not support str->setPos(start)
while (str->getPos() < start) {
str->getChar();
if (str->getChar() == EOF) {
break;
}
}
if (str->getPos() != start) {
error(errInternal, -1, "Failed to reset EmbedStream");
}
}
record = false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment