NordicSemiconductor / IOS-DFU-Library

OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
http://www.nordicsemi.com
BSD 3-Clause "New" or "Revised" License
526 stars 215 forks source link

Bugfix: Resuming Init object #485

Closed philips77 closed 2 years ago

philips77 commented 2 years ago

This PR fixes #479, a long existing issue where the Init Object was incorrectly resumed when reported offset was > 0.

The main part of this fix is here:

-let data = initPacket.subdata(in: Int(offset) ..< Int(initPacketLength - offset))
+let data = initPacket.subdata(in: Int(offset) ..< Int(initPacketLength))

Associated assert was also removed.