mirror of
https://github.com/marqs85/ossc.git
synced 2024-06-16 08:29:33 +00:00
fix profile load not reading all data
This commit is contained in:
parent
4c1b211641
commit
687905780e
|
@ -193,8 +193,8 @@ int read_userdata(alt_u8 entry, int dry_run)
|
||||||
if (vm_to_read >= PAGESIZE-pageoffset) {
|
if (vm_to_read >= PAGESIZE-pageoffset) {
|
||||||
memcpy((char*)video_modes+dstoffset, databuf+pageoffset, PAGESIZE-pageoffset);
|
memcpy((char*)video_modes+dstoffset, databuf+pageoffset, PAGESIZE-pageoffset);
|
||||||
dstoffset += PAGESIZE-pageoffset;
|
dstoffset += PAGESIZE-pageoffset;
|
||||||
pageoffset = 0;
|
|
||||||
vm_to_read -= PAGESIZE-pageoffset;
|
vm_to_read -= PAGESIZE-pageoffset;
|
||||||
|
pageoffset = 0;
|
||||||
pageno++;
|
pageno++;
|
||||||
// check
|
// check
|
||||||
read_flash(USERDATA_OFFSET+(entry*SECTORSIZE)+pageno*PAGESIZE, PAGESIZE, databuf);
|
read_flash(USERDATA_OFFSET+(entry*SECTORSIZE)+pageno*PAGESIZE, PAGESIZE, databuf);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user