Skip to content

Commit 5b5a462

Browse files
committed
Change offset order
1 parent d2f1766 commit 5b5a462

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/bluetooth/MicroBitPartialFlashingService.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ void MicroBitPartialFlashingService::flashData(uint8_t *data)
208208
// blockNum is 0: set up offset
209209
case 0:
210210
{
211-
offset = ((data[1] << 24) | data[2] << 16);
211+
offset = ((data[1] << 8) | data[2] << 0);
212212
blockPacketCount = packetNum;
213213
blockNum++;
214214
break;
215215
}
216216
// blockNum is 1: complete the offset
217217
case 1:
218218
{
219-
offset |= ((data[1] << 8) | data[2] << 0);
219+
offset |= ((data[1] << 24) | data[2] << 16);
220220
blockNum++;
221221
break;
222222
}

0 commit comments

Comments
 (0)