Skip to content

Commit 0154f96

Browse files
committed
[C++] Initialise encoding when field length is zero. Issue aeron-io#583.
1 parent e38fc29 commit 0154f96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sbe-tool/src/main/cpp/otf/Encoding.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ class PrimitiveValue
161161
m_type = type;
162162
if (0 == valueLength)
163163
{
164-
type = PrimitiveType::NONE;
164+
m_type = PrimitiveType::NONE;
165+
m_size = 0;
165166
return;
166167
}
167168

@@ -275,6 +276,7 @@ class PrimitiveValue
275276
default:
276277
{
277278
m_type = PrimitiveType::NONE;
279+
m_size = 0;
278280
break;
279281
}
280282
}

0 commit comments

Comments
 (0)