commit 0f5c34b8abcaf5bf4ae2df665b2f5aed40229502
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Jun 9 17:11:41 2016 +0200

    Initialize Parse::theCatCode_ in constructor
    
    Normally, it is done before tokenizing, but it does not hurt to do it
    even before.
    
    Found by Coverity.

diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp
index 69e3460..895fca2 100644
--- a/src/tex2lyx/Parser.cpp
+++ b/src/tex2lyx/Parser.cpp
@@ -162,6 +162,7 @@ Parser::Parser(idocstream & is, std::string const & 
fixedenc)
 {
        if (fixed_enc_)
                is_.setEncoding(fixedenc);
+       catInit();
 }
 
 
@@ -173,6 +174,7 @@ Parser::Parser(string const & s)
          // An idocstringstream can not change the encoding
          fixed_enc_(true)
 {
+       catInit();
 }
 
 

Reply via email to