From e95199c264dd4c9dcec350745ab835eaaf60c265 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 15 May 2024 07:49:06 +0200 Subject: [PATCH] Missing initialisation of "_initialized" to "false" leads to russian roulette whether or not "_control.begin()" is called. --- src/PF1550.cpp | 5 +++-- src/PF1550.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/PF1550.cpp b/src/PF1550.cpp index 0174f06..fd1ca7c 100644 --- a/src/PF1550.cpp +++ b/src/PF1550.cpp @@ -33,8 +33,9 @@ ******************************************************************************/ PF1550::PF1550(PF1550_IO & io) -: _control(io), - _debug(NULL) +: _control(io) +, _initialized(false) +, _debug(NULL) { } diff --git a/src/PF1550.h b/src/PF1550.h index 295546c..0e6430e 100644 --- a/src/PF1550.h +++ b/src/PF1550.h @@ -100,7 +100,7 @@ class PF1550 private: PF1550_Control _control; - volatile bool _initialized; + bool _initialized; Stream* _debug; };