Fix corrupted file reads (turns out it just read the same stuff over and over) - Fix #955

This commit is contained in:
Gordon Williams 2016-10-24 14:00:46 +01:00
parent 8a71d2503c
commit 61d57044bd

View File

@ -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