fix profile load not reading all data

This commit is contained in:
marqs 2018-11-24 16:19:46 +02:00
parent 4c1b211641
commit 687905780e
1 changed files with 1 additions and 1 deletions

View File

@ -193,8 +193,8 @@ int read_userdata(alt_u8 entry, int dry_run)
if (vm_to_read >= PAGESIZE-pageoffset) {
memcpy((char*)video_modes+dstoffset, databuf+pageoffset, PAGESIZE-pageoffset);
dstoffset += PAGESIZE-pageoffset;
pageoffset = 0;
vm_to_read -= PAGESIZE-pageoffset;
pageoffset = 0;
pageno++;
// check
read_flash(USERDATA_OFFSET+(entry*SECTORSIZE)+pageno*PAGESIZE, PAGESIZE, databuf);