mufs: return actual amount of bytes read in mufs_read()

master
S.J.R. van Schaik 7 years ago
parent 676c9bdbb0
commit 4739b8f995
  1. 1
      source/mufs/file.c

@ -104,6 +104,7 @@ size_t mufs_read(struct mufs_file *file, void *data, size_t len)
if (!(ret = mufs_tree_read(file->tree, data, file->va, len)))
return 0;
ret = min(ret, file->tree->file_size - file->va);
file->va += ret;
return ret;

Loading…
Cancel
Save