vdudouyt / stm8flash

program your stm8 devices with SWIM/stlinkv(1,2)
GNU General Public License v2.0
401 stars 182 forks source link

Issue with serial numbers #135

Closed nitko12 closed 1 year ago

nitko12 commented 3 years ago

Hi,

I think you should hardcode 12 in this for loop,

that fixed the issue I was having, because strlen returns length until the first 0, which isn't the true length of the serial number I presume?

https://github.com/vdudouyt/stm8flash/blob/1fe6521473dcc8615fcf77edc8e22ade6e6ccb56/main.c#L159

spth commented 1 year ago

I merged the fix by @schneidersoft.