microbit: Added additional validation check for fiber_wait_for_event

This commit is contained in:
James Devine 2016-03-24 01:45:56 +00:00
parent 79a13c7edf
commit a73a6b6560
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}