commit 7bb24c18c03aaf5ee073b8bb3bfaa615f4986800
Author:     Quentin Rameau <[email protected]>
AuthorDate: Thu May 26 16:56:53 2016 +0200
Commit:     Quentin Rameau <[email protected]>
CommitDate: Thu May 26 17:11:19 2016 +0200

    [cc1] Adjust how errors are counted
    
    Increment the error number before checking it, this way we actually stop
    at MAXERRNUM, not MAXERRNUM + 1.

diff --git a/cc1/error.c b/cc1/error.c
index 413a49e..79feea2 100644
--- a/cc1/error.c
+++ b/cc1/error.c
@@ -29,7 +29,7 @@ warn_error(int flag, char *fmt, va_list va)
                        fclose(stdout);
                }
                failure = 1;
-               if (nerrors++ == MAXERRNUM) {
+               if (++nerrors == MAXERRNUM) {
                        fputs("too many errors\n", stderr);
                        exit(1);
                }

Reply via email to