Skip to content

Commit

Permalink
encoder value len same as decoder value
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamaika1 authored Aug 3, 2024
1 parent 6e46f16 commit c3845a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src_base/xeve_bsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ int xeve_bsw_write(XEVE_BSW * bs, u32 val, int len) /* len(1 ~ 32) */
int leftbits;

xeve_assert(bs);
xeve_assert(len <= 0); // to avoid shifting by a negative value
xeve_assert(len > 0); // to avoid shifting by a negative value

leftbits = bs->leftbits;
val <<= (32 - len);
Expand Down

0 comments on commit c3845a4

Please sign in to comment.