Commit c43cca3f authored by Kristof Szabados's avatar Kristof Szabados
Browse files

bit_limit needs to be known only after the condition.

Signed-off-by: Kristof Szabados's avatarKristof Szabados <>
parent b9c779d1
......@@ -1343,8 +1343,8 @@ unsigned char TTCN_Buffer::get_byte_rev(const unsigned char* data,
unsigned char ch='\0';
size_t hossz=(len+7)/8-1;
int bit_limit=len%8;
if(idx>hossz) return ch;
const int bit_limit=len%8;
if(bit_limit==0)return data[hossz-idx];
if((hossz-idx)>0) ch|=(data[hossz-idx-1]>>bit_limit)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment