Commit 4a59238b authored by Botond Baranyi's avatar Botond Baranyi Committed by Gerrit Code Review
Browse files

Merge "bit_limit needs to be known only after the condition."

parents 9091d420 c43cca3f
......@@ -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