commit 0a91abbc9f0db6b9ce89db5e640514c2b9a4ddfa
Author: Scott Kostyshak <[email protected]>
Date:   Thu Nov 19 00:18:40 2015 -0500

    Update exit code on second LaTeX run (#9765)
    
    Before, the exit code for the first LaTeX run was used to set the
    flag, which caused an error to be reported when in fact there was no
    error on the second run.
    
    This fix ammends 1dbf0e5a.

diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index e6a185c..0949c69 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -232,12 +232,12 @@ int LaTeX::run(TeXErrors & terr)
        LYXERR(Debug::LATEX, "Run #" << count);
        message(runMessage(count));
 
-       int const exit_code = startscript();
+       int exit_code = startscript();
 
        scanres = scanLogFile(terr);
        if (scanres & ERROR_RERUN) {
                LYXERR(Debug::LATEX, "Rerunning LaTeX");
-               startscript();
+               exit_code = startscript();
                scanres = scanLogFile(terr);
        }
 

Reply via email to