]> git.lyx.org Git - features.git/commitdiff
* src/mathed/MathParser.cpp (getChar):
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 5 Nov 2007 07:15:57 +0000 (07:15 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 5 Nov 2007 07:15:57 +0000 (07:15 +0000)
- empty return if the char is not good() (fix bug 4318).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21425 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathParser.cpp

index 26cf14f4979616a684817309aa9acc9a389a20df..5b811fcc9886e54690844e648cceee5c74010f1a 100644 (file)
@@ -463,8 +463,11 @@ bool Parser::good() const
 
 char_type Parser::getChar()
 {
-       if (!good())
+       if (!good()) {
                error("The input stream is not well...");
+               putback();
+               return char_type();
+       }
        return tokens_[pos_++].character();
 }