wujiangang / ESP8266_IOT_PLATFORM

A demo that should be run with ESP8266 RTOS SDK
http://bbs.espressif.com
Other
240 stars 122 forks source link

Wrong CRC calculation in upgrade_crc_check #9

Open hammer-dp-ua opened 7 years ago

hammer-dp-ua commented 7 years ago

Please rollback a change made in 10.25.2016 08:27:15 by SeregaKai. abs function was placed not just by mistake. Looks like it converts "unsigned int" to "int" inside itself and then really changes bitwise representation if int result is negative.

borro0 commented 6 years ago

I agree on this. The gen_appbin.py used to generate the crc in the first place, also uses abs. image