Skip to content

Commit 106f133

Browse files
author
theuni
committed
Fix uninitialized variable added in b33b9a6
After discussing with BlueMatt, this appears to be harmless in its current state since it's always set before it's used. Initialize it anyway for readability and future safety.
1 parent 4c3e246 commit 106f133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ class CValidationState {
937937
unsigned char chRejectCode;
938938
bool corruptionPossible;
939939
public:
940-
CValidationState() : mode(MODE_VALID), nDoS(0) {}
940+
CValidationState() : mode(MODE_VALID), nDoS(0), corruptionPossible(false) {}
941941
bool DoS(int level, bool ret = false,
942942
unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
943943
bool corruptionIn=false) {

0 commit comments

Comments
 (0)