wrong timing and offset for buffer shifting in reading
This commit is contained in:
parent
9aef0cdac0
commit
2ff0a5061b
|
@ -185,8 +185,8 @@ pic_fread(void *ptr, size_t block, size_t nitems, pic_file *file)
|
|||
avail = file->c - file->s;
|
||||
if (size <= avail) {
|
||||
memcpy(dst, file->s, size);
|
||||
memmove(file->s, file->s + size, avail - size);
|
||||
file->c -= size;
|
||||
memmove(file->s, file->c, avail - size);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue