Fix ff_read() call

This commit is contained in:
Sergey Lyubka 2022-07-01 13:18:49 +01:00
parent 99f0688377
commit 035de980e3
3 changed files with 3 additions and 3 deletions

View File

@ -43,6 +43,6 @@ input.onchange = function(ev) {
r.readAsArrayBuffer(f);
r.onload = function() {
ev.target.value = '';
sendFileData(f.name, new Uint8Array(r.result), 4096);
sendFileData(f.name, new Uint8Array(r.result), 2048);
};
};

View File

@ -1000,7 +1000,7 @@ static void ff_close(void *fp) {
}
static size_t ff_read(void *fp, void *buf, size_t len) {
unsigned n = 0, misalign = ((size_t) buf) & 3;
UINT n = 0, misalign = ((size_t) buf) & 3;
if (misalign) {
char aligned[4];
f_read((FIL *) fp, aligned, len > misalign ? misalign : len, &n);

View File

@ -88,7 +88,7 @@ static void ff_close(void *fp) {
}
static size_t ff_read(void *fp, void *buf, size_t len) {
unsigned n = 0, misalign = ((size_t) buf) & 3;
UINT n = 0, misalign = ((size_t) buf) & 3;
if (misalign) {
char aligned[4];
f_read((FIL *) fp, aligned, len > misalign ? misalign : len, &n);