| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6d881b8 commit 916b319
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,7 @@ extern "C" { | |||
| 10 | 10 | ||
| 11 | 11 | #define UVWASI_VERSION_MAJOR 0 | |
| 12 | 12 | #define UVWASI_VERSION_MINOR 0 | |
| 13 | - #define UVWASI_VERSION_PATCH 12 | ||
| 13 | + #define UVWASI_VERSION_PATCH 13 | ||
| 14 | 14 | #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ | |
| 15 | 15 | (UVWASI_VERSION_MINOR << 8) | \ | |
| 16 | 16 | (UVWASI_VERSION_PATCH)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1384,8 +1384,14 @@ uvwasi_errno_t uvwasi_fd_readdir(uvwasi_t* uvwasi, | |||
| 1384 | 1384 | } | |
| 1385 | 1385 | ||
| 1386 | 1386 | /* Write dirent to the buffer if it will fit. */ | |
| 1387 | - if (UVWASI_SERDES_SIZE_dirent_t + *bufused > buf_len) | ||
| 1387 | + if (UVWASI_SERDES_SIZE_dirent_t + *bufused > buf_len) { | ||
| 1388 | + /* If there are more entries to be written to the buffer we set | ||
| 1389 | + * bufused, which is the return value, to the length of the buffer | ||
| 1390 | + * which indicates that there are more entries to be read. | ||
| 1391 | + */ | ||
| 1392 | + *bufused = buf_len; | ||
| 1388 | 1393 | break; | |
| 1394 | + } | ||
| 1389 | 1395 | ||
| 1390 | 1396 | uvwasi_serdes_write_dirent_t(buf, *bufused, &dirent); | |
| 1391 | 1397 | *bufused += UVWASI_SERDES_SIZE_dirent_t; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments