Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Lee <oliverzlee@gmail.com>2018-02-14 14:16:45 +0300
committerOliver Lee <oliverzlee@gmail.com>2018-02-15 00:37:59 +0300
commitbec486f2c1bd696ef92d83257aad69c696f30049 (patch)
tree4387291c294a3089bccd24b0bf65e5321f2760e6 /pb_encode.c
parentb28d29f987f71297b8a032aa9a47f06b9e44de94 (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.c2
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;
}