From 3181bb62ae50ffa6732115e5a6bb7c4881eac908 Mon Sep 17 00:00:00 2001 From: Eduardo Lima Date: Fri, 15 Sep 2023 11:34:24 +0200 Subject: [PATCH] Fix BangleJS debug builds failing on bogus assert call An assert with a bogus/outdated condition is failing debug builds for BangleJS. This patch fixes the condition by checking against `IOEvent->flags` field instead. --- libs/banglejs/jswrap_bangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/banglejs/jswrap_bangle.c b/libs/banglejs/jswrap_bangle.c index 03c83eb528..e11d81e765 100644 --- a/libs/banglejs/jswrap_bangle.c +++ b/libs/banglejs/jswrap_bangle.c @@ -6062,7 +6062,7 @@ JsVar *jswrap_banglejs_appRect() { /// Called from jsinteractive when an event is parsed from the event queue for Bangle.js (executed outside IRQ) void jsbangle_exec_pending(IOEvent *evt) { - assert(event=>type == EV_BANGLEJS); + assert(evt->flags & EV_BANGLEJS); uint16_t value = ((uint8_t)evt->data.chars[1])<<8 | (uint8_t)evt->data.chars[2]; switch ((JsBangleEvent)evt->data.chars[0]) { case JSBE_HRM_ENV: {