From d399f69028a934861ddf41731e932e2cb7cb58f3 Mon Sep 17 00:00:00 2001 From: Cristian Popescu Date: Fri, 14 Aug 2020 17:37:20 +0300 Subject: [PATCH] Reinit updater md5 related fields MD5 cleanup on begin Typos --- libraries/Update/src/Update.h | 4 ++-- libraries/Update/src/Updater.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/Update/src/Update.h b/libraries/Update/src/Update.h index 9a46a784870..2812af10c49 100644 --- a/libraries/Update/src/Update.h +++ b/libraries/Update/src/Update.h @@ -88,12 +88,12 @@ class UpdateClass { bool setMD5(const char * expected_md5); /* - returns the MD5 String of the sucessfully ended firmware + returns the MD5 String of the successfully ended firmware */ String md5String(void){ return _md5.toString(); } /* - populated the result with the md5 bytes of the sucessfully ended firmware + populated the result with the md5 bytes of the successfully ended firmware */ void md5(uint8_t * result){ return _md5.getBytes(result); } diff --git a/libraries/Update/src/Updater.cpp b/libraries/Update/src/Updater.cpp index cfa28827e96..fb9b8378395 100644 --- a/libraries/Update/src/Updater.cpp +++ b/libraries/Update/src/Updater.cpp @@ -121,6 +121,8 @@ bool UpdateClass::begin(size_t size, int command, int ledPin, uint8_t ledOn) { _reset(); _error = 0; + _target_md5 = emptyString; + _md5 = MD5Builder(); if(size == 0) { _error = UPDATE_ERROR_SIZE;