From: Brett Gordon Date: Sat, 5 Mar 2016 14:55:08 +0000 (-0500) Subject: opendir_r: bugfix: bad first iteration of readdir X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=b63a70808255266a60062b9f7a392b596bf76b79;p=FUZIX.git opendir_r: bugfix: bad first iteration of readdir --- diff --git a/Library/libs/opendir_r.c b/Library/libs/opendir_r.c index 9fe3d9ae..c32ffdef 100644 --- a/Library/libs/opendir_r.c +++ b/Library/libs/opendir_r.c @@ -20,5 +20,7 @@ DIR *opendir_r(DIR *dir, char *path) if ((dir->dd_fd = open(path, O_RDONLY | O_CLOEXEC)) < 0) return NULL; dir->dd_loc = 0; + dir->_priv.next = 0; + dir->_priv.last = 0; return dir; }