STM32CubeProgrammer 2.13.0 miscalculates flash sectors to erase
When loading a .hex file into flash, the STM32CubeProgrammer (v 2.13.0) miscalculates which sectors to erase and as a result, the download often fails unless the region being loaded has been previously erased or happens to contain the same values.
For example (see attached image), when loading an image that is 0x23B74 bytes (142.86KB) bytes to address 0x08004000 in an STM32L471 (256 x 2K sectors), it erases sectors 4..39.
The start sector for address 0x08004000 should be 8 (8 x 2048 = 0x4000) and the end sector (0x08004000+0x23B74=0x08027B74) should be 0x4F (79 decimal)

If I'm doing something wrong, suggestions would be appreciated!
