Skip to content
Snippets Groups Projects
Commit 32e4887b authored by Kristof Szabados's avatar Kristof Szabados
Browse files

OER fix: in case of unsigned integers shifting should start with 8 bits.


Signed-off-by: default avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent dd3e5355
No related branches found
No related tags found
No related merge requests found
......@@ -1800,7 +1800,11 @@ int INTEGER::OER_encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_buf) c
size_t len = 1;
// No length restriction on integer
if (p_td.oer->bytes == -1) {
ulong_val >>= 7;
if (p_td.oer->signed_) {
ulong_val >>= 7;
} else {
ulong_val >>= 8;
}
while (ulong_val != 0) {
len++;
ulong_val >>= 8;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment