Commit 5e73c9d3 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed OER encoding of unbound optional fields in RT2 (bug 560347)



Change-Id: Ic1b9927bc3ac2a11ea8bf1b727ca931ac0585950
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 680d8ac6
......@@ -6421,7 +6421,8 @@ int Record_Type::OER_encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_bu
if (is_default_field) {
next_default_idx++;
}
if (!is_default_field || !get_at(p_td.oer->p[i])->is_equal(default_value)) {
if (get_at(p_td.oer->p[i])->is_present() &&
(!is_default_field || !get_at(p_td.oer->p[i])->is_equal(default_value))) {
get_at(p_td.oer->p[i])->OER_encode(*fld_descr(p_td.oer->p[i]), p_buf);
}
}
......@@ -6542,7 +6543,8 @@ int Record_Type::OER_encode(const TTCN_Typedescriptor_t& p_td, TTCN_Buffer& p_bu
if (is_default_field) {
next_default_idx++;
}
if (!is_default_field || !get_at(p_td.oer->p[j])->is_equal(default_value)) {
if (get_at(p_td.oer->p[j])->is_present() &&
(!is_default_field || !get_at(p_td.oer->p[j])->is_equal(default_value))) {
get_at(p_td.oer->p[j])->OER_encode(*fld_descr(p_td.oer->p[j]), tmp_buf);
}
}
......
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