chrisjoyce911 / esp32FOTA

Experiments in firmware OTA updates for ESP32 dev boards
The Unlicense
358 stars 86 forks source link

Fix type mismatch in error reporting #133

Closed raomin closed 1 year ago

raomin commented 1 year ago

There is a type mismatch in the reporting of an update failure here

getError() returns an uint8

    uint8_t getError(){ return _error; }

but it's expecting a char*

        log_e("An Update Error Occurred. Error #: %s", F_Update.getError());

If called, this crashes the esp32 as printf would try to access the uint8 as address for a char[].

This PR is to replace the line of log to:

        log_e("An Update Error Occurred. Error #: %d", F_Update.getError());

Thanks