From: Alexei Sheplyakov Date: Mon, 25 Aug 2008 13:49:58 +0000 (+0400) Subject: lexer: when switching to another output stream, clean last read character. X-Git-Tag: release_1-5-0~63^2~17 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=581244b7b8fc9b5f81291e1a3f5731939e3f3d8e;ds=sidebyside lexer: when switching to another output stream, clean last read character. Otherwise we prepend to the current stream the last character read from the previous stream, which is obviously incorrect. --- diff --git a/ginac/parser/lexer.cpp b/ginac/parser/lexer.cpp index ed1f894f..894a2ad8 100644 --- a/ginac/parser/lexer.cpp +++ b/ginac/parser/lexer.cpp @@ -126,6 +126,7 @@ void lexer::switch_input(std::istream* in) input = in; line_num = 0; column = 0; + c = ' '; } } // namespace GiNaC