Browse Source

chain: define enum used as bit field as uint32_t

Bitwise logic combined with `<` with undefined signedness will
potentially results in undefined behavior. Fix this by defining the type
as a c++11 typed enum.

Fixes #6017.
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
073225cb01
  1. 2
      src/chain.h

2
src/chain.h

@ -54,7 +54,7 @@ struct CDiskBlockPos @@ -54,7 +54,7 @@ struct CDiskBlockPos
};
enum BlockStatus {
enum BlockStatus: uint32_t {
//! Unused.
BLOCK_VALID_UNKNOWN = 0,

Loading…
Cancel
Save