Skip to content

Commit

Permalink
Fix logical operation by bitwise
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 10, 2015
1 parent 1d7318e commit 1832985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/src/common/saccp_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ uint8_t handler_saccp_receive( MEMORY_HANDLE mem_h, sasp_nonce_type chain_id )
{
uint16_t hh = zepto_parse_encoded_uint16( &po );
// TODO: use bit field processing instead in the code below where applicable
uint8_t h_type = hh && 0x7;
uint8_t h_type = hh & 0x7;
uint16_t sz = hh >> 3;
switch ( h_type )
{
Expand Down

0 comments on commit 1832985

Please sign in to comment.