diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-28 13:35:16 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-28 13:35:16 +0200 |
commit | 073225cb01d9c2629c7a423dbe6afcd07601ffb7 (patch) | |
tree | 287b825155920aed49f3111aee5b937078dc2223 /src/chain.h | |
parent | d9594bfe0c3e8818f5490979c3d94d752383352e (diff) |
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.
Diffstat (limited to 'src/chain.h')
-rw-r--r-- | src/chain.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chain.h b/src/chain.h index 5b9605a80b..017d4fe457 100644 --- a/src/chain.h +++ b/src/chain.h @@ -54,7 +54,7 @@ struct CDiskBlockPos }; -enum BlockStatus { +enum BlockStatus: uint32_t { //! Unused. BLOCK_VALID_UNKNOWN = 0, |