From 581244b7b8fc9b5f81291e1a3f5731939e3f3d8e Mon Sep 17 00:00:00 2001 From: Alexei Sheplyakov Date: Mon, 25 Aug 2008 17:49:58 +0400 Subject: [PATCH] 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. --- ginac/parser/lexer.cpp | 1 + 1 file changed, 1 insertion(+) 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 -- 2.44.0