]> git.lyx.org Git - lyx.git/blobdiff - src/Lexer.cpp
tex2lyx/text.cpp: fix 2 typos
[lyx.git] / src / Lexer.cpp
index 778a0f2218338df5e781a6feacb35da599752eee..664e1b9bfb6c10867b6981479a50d4d8b2c80fe2 100644 (file)
@@ -274,9 +274,9 @@ bool Lexer::Pimpl::setFile(FileName const & filename)
 
        // Skip byte order mark.
        if (is.peek() == 0xef) {
-               int c = is.get();
+               is.get();
                if (is.peek() == 0xbb) {
-                       c = is.get();
+                       is.get();
                        LASSERT(is.get() == 0xbf, /**/);
                } else
                        is.unget();
@@ -473,7 +473,7 @@ bool Lexer::Pimpl::eatLine()
                is.get(cc);
                c = cc;
                //LYXERR(Debug::LYXLEX, "Lexer::EatLine read char: `" << c << '\'');
-               if (c != '\r')
+               if (c != '\r' && is)
                        buff.push_back(c);
        }