diff options
author | Oliver Lee <oliverzlee@gmail.com> | 2018-02-14 14:16:45 +0300 |
---|---|---|
committer | Oliver Lee <oliverzlee@gmail.com> | 2018-02-15 00:37:59 +0300 |
commit | bec486f2c1bd696ef92d83257aad69c696f30049 (patch) | |
tree | 4387291c294a3089bccd24b0bf65e5321f2760e6 /pb_encode.c | |
parent | b28d29f987f71297b8a032aa9a47f06b9e44de94 (diff) |
Handle a single non-packed repeated fixed count field
Allow the elements of that single non-packed repeated fixed count field
to be interleaved among other (non-packed repeated fixed count) fields.
Multiple non-packed repeated fixed count fields are allowed if the
elements are not interleaved.
An error is returned if the count of a repeated fixed count field is not
equal the expected count.
Diffstat (limited to 'pb_encode.c')
-rw-r--r-- | pb_encode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pb_encode.c b/pb_encode.c index 0bce3b8..089172c 100644 --- a/pb_encode.c +++ b/pb_encode.c @@ -364,7 +364,7 @@ static bool checkreturn encode_basic_field(pb_ostream_t *stream, case PB_HTYPE_REPEATED: { pb_size_t count; if (field->size_offset != 0) { - count = *(pb_size_t*)pSize; + count = *(const pb_size_t*)pSize; } else { count = field->array_size; } |