]> www.ginac.de Git - ginac.git/commitdiff
lexer: when switching to another output stream, clean last read character.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Mon, 25 Aug 2008 13:49:58 +0000 (17:49 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Tue, 9 Sep 2008 08:32:49 +0000 (12:32 +0400)
Otherwise we prepend to the current stream the last character read from
the previous stream, which is obviously incorrect.

ginac/parser/lexer.cpp

index ed1f894fea381bdc9c553d9a2811ff12b1697bcb..894a2ad8afeef8ae484eca01274290dc00074815 100644 (file)
@@ -126,6 +126,7 @@ void lexer::switch_input(std::istream* in)
        input = in;
        line_num = 0;
        column = 0;
+       c = ' ';
 }
 
 } // namespace GiNaC