]> git.lyx.org Git - lyx.git/blobdiff - src/VCBackend.cpp
Account for old versions of Pygments
[lyx.git] / src / VCBackend.cpp
index 3eeb3d6a3ef3ccccf1db19aecfdd76ede3b1e8d7..a152a28d101e11f209f202243f6c0b011a91d2f3 100644 (file)
@@ -31,6 +31,7 @@
 #include "support/TempFile.h"
 
 #include <fstream>
+#include <iomanip>
 #include <sstream>
 
 using namespace std;
@@ -568,10 +569,10 @@ void CVS::scanMaster()
                if (contains(line, tmpf)) {
                        // Ok extract the fields.
                        smatch sm;
-
-                       // false positive from coverity
-                       // coverity[CHECKED_RETURN]
-                       regex_match(line, sm, reg);
+                       if (!regex_match(line, sm, reg)) {
+                               LYXERR(Debug::LYXVC, "\t  Cannot parse line. Skipping.");
+                               continue;
+                       }
 
                        //sm[0]; // whole matched string
                        //sm[1]; // filename