[ox/fs] Fix various file system bugs

This commit is contained in:
2019-10-31 00:07:39 -05:00
parent fc337922ac
commit 7f5f74e2a6
5 changed files with 71 additions and 38 deletions

View File

@@ -75,7 +75,7 @@ Error PathIterator::get(char *pathOut, std::size_t pathOutSize) {
std::size_t end = substr - m_path;
size = end - start;
// cannot fit the output in the output parameter
if (size >= pathOutSize) {
if (size >= pathOutSize || size == 0) {
return OxError(1);
}
ox_memcpy(pathOut, &m_path[start], size);