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.
This commit is contained in:
Scott Kostyshak 2015-11-19 00:18:40 -05:00
parent 6f207b37ed
commit 0a91abbc9f

View File

@ -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);
}