microbit: Added additional validation check for fiber_wait_for_event
This commit is contained in:
parent
79a13c7edf
commit
a73a6b6560
|
@ -346,8 +346,9 @@ void fiber_sleep(unsigned long t)
|
|||
int fiber_wait_for_event(uint16_t id, uint16_t value)
|
||||
{
|
||||
int ret = fiber_wake_on_event(id, value);
|
||||
|
||||
schedule();
|
||||
|
||||
if(ret == MICROBIT_OK)
|
||||
schedule();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue