summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/apps/loader/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/firmware/apps/loader/main.c')
-rw-r--r--src/target/firmware/apps/loader/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/target/firmware/apps/loader/main.c b/src/target/firmware/apps/loader/main.c
index 8bdbc740..39b8998e 100644
--- a/src/target/firmware/apps/loader/main.c
+++ b/src/target/firmware/apps/loader/main.c
@@ -281,7 +281,7 @@ static void cmd_handler(uint8_t dlci, struct msgb *msg)
crc = msgb_pull_u16(msg);
address = msgb_pull_u32(msg);
- data = msgb_pull(msg, nbytes);
+ data = msgb_pull(msg, nbytes) - nbytes;
mycrc = osmo_crc16(0, data, nbytes);
@@ -399,7 +399,7 @@ static void cmd_handler(uint8_t dlci, struct msgb *msg)
chip = msgb_pull_u8(msg);
address = msgb_pull_u32(msg);
- data = msgb_pull(msg, nbytes);
+ data = msgb_pull(msg, nbytes) - nbytes;
mycrc = osmo_crc16(0, data, nbytes);