Skip to content

Commit 3c39ae8

Browse files
committed
clear offset when crossing flash pages
When doing a flash read that crosses pages, clear the offset once the first page is read.
1 parent 5a125cd commit 3c39ae8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/jtag2rw.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ uchar *jtag2::jtagRead(unsigned long addr, unsigned int numBytes)
193193

194194
numBytes -= chunksize;
195195
targetOffset += chunksize;
196+
offset = 0;
196197

197198
chunksize = numBytes > pageSize? pageSize: numBytes;
198199
pageAddr += pageSize;

0 commit comments

Comments
 (0)