Skip to content

Commit

Permalink
Handle b<0
Browse files Browse the repository at this point in the history
  • Loading branch information
pmconrad committed Aug 21, 2018
1 parent 79ff754 commit 02a4516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fc/io/raw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace fc {
uint64_t v = 0; char b = 0; uint8_t by = 0;
do {
s.get(b);
if( by >= 64 || (by == 63 && b > 1) )
if( by >= 64 || (by == 63 && uint8_t(b) > 1) )
FC_THROW_EXCEPTION( overflow_exception, "Invalid packed unsigned_int!" );
v |= uint64_t(uint8_t(b) & 0x7f) << by;
by += 7;
Expand Down

0 comments on commit 02a4516

Please sign in to comment.