diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-24 15:04:59 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-05-24 15:04:59 +0300 |
commit | 2b05b60bbc7e2ddcfc206eb817707713e1a90cc6 (patch) | |
tree | 7cdcf6c0e657dd22ebebbca59a64435887d3a338 /esp8266 | |
parent | 4681b86850076c013be2477d3850fd536361b62e (diff) |
esp8266/esp_mphal: mp_uos_dupterm_deactivate() may raise exception.
So, keep call to it protected via NLR still.
Diffstat (limited to 'esp8266')
-rw-r--r-- | esp8266/esp_mphal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/esp8266/esp_mphal.c b/esp8266/esp_mphal.c index 04154a378..45f7f5c0f 100644 --- a/esp8266/esp_mphal.c +++ b/esp8266/esp_mphal.c @@ -171,11 +171,12 @@ static int call_dupterm_read(void) { } mp_buffer_info_t bufinfo; mp_get_buffer_raise(res, &bufinfo, MP_BUFFER_READ); - nlr_pop(); if (bufinfo.len == 0) { mp_uos_deactivate("dupterm: EOF received, deactivating\n", MP_OBJ_NULL); + nlr_pop(); return -1; } + nlr_pop(); if (*(byte*)bufinfo.buf == interrupt_char) { mp_keyboard_interrupt(); return -2; |