From: Robert Pengelly Date: Sun, 31 May 2026 11:45:42 +0000 (+0100) Subject: Don't forget to check if max_errors is more than zero X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=99ac97e1789d2c22fab2883c6cb235cadf2880f4;p=scc.git Don't forget to check if max_errors is more than zero --- diff --git a/report.c b/report.c index 2206a2b..1952abb 100755 --- a/report.c +++ b/report.c @@ -158,7 +158,7 @@ void report_at (const char *filename, unsigned long lineno, int type, const char output_message (filename, lineno, 0, type, fmt, ap); va_end (ap); - if (errors >= state->max_errors) { + if (state->max_errors > 0 && errors >= state->max_errors) { exit (EXIT_FAILURE); } @@ -256,7 +256,7 @@ void report_line_at (const char *filename, unsigned long lineno, int type, const } - if (errors >= state->max_errors) { + if (state->max_errors > 0 && errors >= state->max_errors) { exit (EXIT_FAILURE); }