Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Commit 397bb55

Browse files
committed
example code: fix to latent (no impact to existing usage) bug in CRC routine
1 parent 07d5329 commit 397bb55

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

example-apps/mouseplay/LinkPatch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ function crc32_calc(crc, address, length)
132132

133133
peek = ElfFile.peekBytes(address, chunk, false, padding_value);
134134
length -= chunk;
135+
address += chunk;
135136

136137
for (i = 0; i < chunk; i++)
137138
{

example-apps/vcp/LinkPatch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ function crc32_calc(crc, address, length)
132132

133133
peek = ElfFile.peekBytes(address, chunk, false, padding_value);
134134
length -= chunk;
135+
address += chunk;
135136

136137
for (i = 0; i < chunk; i++)
137138
{

0 commit comments

Comments
 (0)