From 3cafb856d7692e7e1fe448cf24f918f31819f2d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 5 Nov 2007 07:15:57 +0000 Subject: [PATCH] * src/mathed/MathParser.cpp (getChar): - 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 26cf14f497..5b811fcc98 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -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(); } -- 2.39.2