It should only return those in the mask.
This causes an issue if using chEvtDispatch(...) to execute functions.
i.e. flags outside the expected masked range will access invalid pointer(s).
Code: Select all
Index: chevents.c
===================================================================
--- chevents.c (revision 12234)
+++ chevents.c (working copy)
@@ -262,7 +262,7 @@
elp->flags = (eventflags_t)0;
chSysUnlock();
- return flags;
+ return flags & elp->wflags;
}
/**