Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse Titan
titan.core
Commits
4a59238b
Commit
4a59238b
authored
Jan 25, 2018
by
Botond Baranyi
Committed by
Gerrit Code Review
Jan 25, 2018
Browse files
Merge "bit_limit needs to be known only after the condition."
parents
9091d420
c43cca3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/Encdec.cc
View file @
4a59238b
...
...
@@ -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
];
ch
=
data
[
hossz
-
idx
]
<<
(
8
-
bit_limit
);
if
((
hossz
-
idx
)
>
0
)
ch
|=
(
data
[
hossz
-
idx
-
1
]
>>
bit_limit
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment