aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-08-07 16:29:00 +0100
committergingerBill <bill@gingerbill.org>2021-08-07 16:29:00 +0100
commit000bda841946c28bac9a94dd73651a4a1e1062f3 (patch)
tree266c746923fb2c5d6ea4771aa484ae2adecc8043 /src/tokenizer.cpp
parent423b84234791678647e726634a26676df3d289b2 (diff)
Reduce superfluous error messages for return statements expecting not-1 return values
Diffstat (limited to 'src/tokenizer.cpp')
-rw-r--r--src/tokenizer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp
index 70de96dfb..8e42c649f 100644
--- a/src/tokenizer.cpp
+++ b/src/tokenizer.cpp
@@ -278,7 +278,11 @@ gb_global ErrorCollector global_error_collector;
bool any_errors(void) {
- return global_error_collector.error_buffer.count > 0;
+ bool any_errors = false;
+ mutex_lock(&global_error_collector.block_mutex);
+ any_errors = global_error_collector.error_buffer.count > 0;
+ mutex_unlock(&global_error_collector.block_mutex);
+ return any_errors;
}
void init_global_error_collector(void) {