MathParser: Do not rewind the stream if we can't read from it

If the stream is not good, we don't need to 'putback', because we didn't
read anything yet. If we now do rewind the stream, we are asking for
problems as in bug #8089.

This was introduced in [3cafb856\lyxgit] to fix bug #4318.
This commit is contained in:
Vincent van Ravesteijn 2012-05-02 13:37:32 +02:00
parent e90cd4180e
commit 1ef930c058

View File

@ -536,7 +536,6 @@ char_type Parser::getChar()
{
if (!good()) {
error("The input stream is not well...");
putback();
return 0;
}
return tokens_[pos_++].character();