summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-12-16 13:26:20 +0000
committerDamien George <damien.p.george@gmail.com>2015-12-16 13:26:20 +0000
commita1528364b30844a419675532e997843185448a63 (patch)
tree45b5e611a677a56a3edf772d8b288988bccf4635
parent3386477b297251c0ba83e6cf13fe9aaddcac57fa (diff)
downloadmicropython-a1528364b30844a419675532e997843185448a63.tar.gz
micropython-a1528364b30844a419675532e997843185448a63.zip
unix/modos: Fix silly bugs in ilistdir tuple creation.
-rw-r--r--unix/modos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/modos.c b/unix/modos.c
index 83b24c05c3..580722db72 100644
--- a/unix/modos.c
+++ b/unix/modos.c
@@ -182,12 +182,12 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
#else
// DT_UNKNOWN should have 0 value on any reasonable system
- t->items[1] = 0;
+ t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
#endif
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
#else
- t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
+ t->items[2] = MP_OBJ_NEW_SMALL_INT(0);
#endif
return MP_OBJ_FROM_PTR(t);
}