summaryrefslogtreecommitdiff
path: root/robot/errcatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'robot/errcatch.c')
-rw-r--r--robot/errcatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/robot/errcatch.c b/robot/errcatch.c
index 82da820..2a59d3d 100644
--- a/robot/errcatch.c
+++ b/robot/errcatch.c
@@ -14,7 +14,7 @@ uint8_t g_w2_error_buffer_full = 0;
uint8_t g_w2_error_uncaught = 0;
void w2_errcatch_main() {
- while (g_w2_error_index != g_w2_error_offset) {
+ while (g_w2_error_offset != g_w2_error_index) {
w2_s_error *error = g_w2_error_buffer[g_w2_error_offset];
w2_errcatch_handle_error(error);
g_w2_error_offset = (g_w2_error_offset + 1) % W2_ERROR_BUFFER_SIZE;