From 0e1290695064ee3631e9290e3d91cead0c2fdcc4 Mon Sep 17 00:00:00 2001 From: Jorg Neves Bliesener Date: Sun, 26 Jul 2020 18:39:55 +0200 Subject: [PATCH] Initialize _ledPin (#7487) * Initialize _ledPin _ledPin should be initialized to -1 in the constructor to avoid setting a random pin when calling Updater::end without having called Updater::begin before. This happens, for example, in the Homie software * Fix field sequence --- cores/esp8266/Updater.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/esp8266/Updater.cpp b/cores/esp8266/Updater.cpp index 351a57746..03bc5c3f8 100644 --- a/cores/esp8266/Updater.cpp +++ b/cores/esp8266/Updater.cpp @@ -35,6 +35,7 @@ UpdaterClass::UpdaterClass() , _startAddress(0) , _currentAddress(0) , _command(U_FLASH) +, _ledPin(-1) , _hash(nullptr) , _verify(nullptr) , _progress_callback(nullptr)