Skip to content

Commit a152836

Browse files
committed
unix/modos: Fix silly bugs in ilistdir tuple creation.
1 parent 3386477 commit a152836

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

unix/modos.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ STATIC mp_obj_t listdir_next(mp_obj_t self_in) {
182182
t->items[1] = MP_OBJ_NEW_SMALL_INT(dirent->d_type);
183183
#else
184184
// DT_UNKNOWN should have 0 value on any reasonable system
185-
t->items[1] = 0;
185+
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
186186
#endif
187187
#if !defined(_DIRENT_HAVE_D_INO) || _DIRENT_HAVE_D_INO
188188
t->items[2] = MP_OBJ_NEW_SMALL_INT(dirent->d_ino);
189189
#else
190-
t->items[1] = MP_OBJ_NEW_SMALL_INT(0);
190+
t->items[2] = MP_OBJ_NEW_SMALL_INT(0);
191191
#endif
192192
return MP_OBJ_FROM_PTR(t);
193193
}

0 commit comments

Comments
 (0)