Skip to content

Commit e95199c

Browse files
committed
Missing initialisation of "_initialized" to "false" leads to russian roulette whether or not "_control.begin()" is called.
1 parent b6d9dff commit e95199c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/PF1550.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
******************************************************************************/
3434

3535
PF1550::PF1550(PF1550_IO & io)
36-
: _control(io),
37-
_debug(NULL)
36+
: _control(io)
37+
, _initialized(false)
38+
, _debug(NULL)
3839
{
3940

4041
}

src/PF1550.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class PF1550
100100

101101
private:
102102
PF1550_Control _control;
103-
volatile bool _initialized;
103+
bool _initialized;
104104
Stream* _debug;
105105
};
106106

0 commit comments

Comments
 (0)