Skip to content

Commit

Permalink
Fix bit compare bug
Browse files Browse the repository at this point in the history
  • Loading branch information
4ZM committed Jan 27, 2019
1 parent 130bc38 commit e13d373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void print_tag_byte_bits(size_t byte, size_t first_bit, size_t last_bit) {
}

// Inside mask
if (1<<i && data)
if ((1<<i) & data)
printf("1");
else
printf("0");
Expand Down

0 comments on commit e13d373

Please sign in to comment.