Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gdb_main: Fix remaining length calculation for 'X' 'M' and 'vFlashWrite'
When removing use of sscanf from gdb_main the calculation of the length of the remaining data portion of the 'X', 'M', and 'vFlashWrite' packet types was done wrongly. The difference between the start of data pointer and start of buffer pointer was reversed resulting in adding this to the total length rather than subtracting it. For the 'X' and 'M' packets this causes them to accept lengths longer than the supplied data but correct packets would still function as expected. For the 'vFlashWrite' packet the length passed to the flash write function was about 8 larger than it should have been which could cause problems. The calculation of the data length portion of the packets has been corrected so all three now work as expected.
- Loading branch information