fs Fix bug, check if fs_read() returned < 0
This commit is contained in:
@ -60,7 +60,7 @@ void fs_fetch(void) {
|
|||||||
uint8_t *buf = umalloc(statbuf.size+1);
|
uint8_t *buf = umalloc(statbuf.size+1);
|
||||||
string_memset(buf, 0, statbuf.size+1);
|
string_memset(buf, 0, statbuf.size+1);
|
||||||
|
|
||||||
if (fs_read(h, buf, statbuf.size, 0)) {
|
if (fs_read(h, buf, statbuf.size, 0) < 0) {
|
||||||
uprintf("fs: coult not read %s\n", path);
|
uprintf("fs: coult not read %s\n", path);
|
||||||
goto donefile;
|
goto donefile;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user