mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 23:49:44 +08:00
Fix ff_read() call
This commit is contained in:
parent
99f0688377
commit
035de980e3
@ -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);
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user