diff options
| author | Dan Halbert <halbert@halwitz.org> | 2018-06-21 09:24:40 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2018-06-21 09:24:40 -0400 |
| commit | dbf1a2f7d55c8fc80df699c3a5792a29c46ea3e2 (patch) | |
| tree | 5eaf5e0b03f237f8b060f04488fd960ae87911c5 /extmod | |
| parent | de4cd1ee739ec93acc7a61252462e8a2f117a259 (diff) | |
allow '/' to be mounted on '/' from Python code
Diffstat (limited to 'extmod')
| -rw-r--r-- | extmod/vfs_fat_diskio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/vfs_fat_diskio.c b/extmod/vfs_fat_diskio.c index 43c390a11..a147d601a 100644 --- a/extmod/vfs_fat_diskio.c +++ b/extmod/vfs_fat_diskio.c @@ -135,7 +135,7 @@ DRESULT disk_read ( if (nlr_push(&nlr) == 0) { mp_obj_t ret = mp_call_method_n_kw(2, 0, vfs->readblocks); nlr_pop(); - if (mp_obj_get_int(ret) != 0) { + if (ret != mp_const_none && MP_OBJ_SMALL_INT_VALUE(ret) != 0) { return RES_ERROR; } } else { @@ -180,7 +180,7 @@ DRESULT disk_write ( if (nlr_push(&nlr) == 0) { mp_obj_t ret = mp_call_method_n_kw(2, 0, vfs->writeblocks); nlr_pop(); - if (mp_obj_get_int(ret) != 0) { + if (ret != mp_const_none && MP_OBJ_SMALL_INT_VALUE(ret) != 0) { return RES_ERROR; } } else { |
