]> git.lyx.org Git - features.git/commitdiff
Initialize Parse::theCatCode_ in constructor
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jun 2016 15:11:41 +0000 (17:11 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 9 Jun 2016 15:11:41 +0000 (17:11 +0200)
Normally, it is done before tokenizing, but it does not hurt to do it
even before.

Found by Coverity.

src/tex2lyx/Parser.cpp

index 69e3460f459de17c1ccc6f15b564eeac8589af69..895fca221e191563f4fc84c4daf183da95d4d467 100644 (file)
@@ -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();
 }