mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Fix corrupted file reads (turns out it just read the same stuff over and over) - Fix #955
This commit is contained in:
parent
8a71d2503c
commit
61d57044bd
@ -458,6 +458,7 @@ JsVar *jswrap_file_read(JsVar* parent, int length) {
|
||||
if (buffer) {
|
||||
res = f_read(&file.data.handle, jsvGetFlatStringPointer(buffer), len, &actual);
|
||||
if (res) jsfsReportError("Unable to read file", res);
|
||||
fileSetVar(&file);
|
||||
return buffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user