commit | 77a6d2e4634782986798e77ce796aee333806f95 | [log] [tgz] |
---|---|---|
author | George Kulakowski <kulakowski@google.com> | Sun Mar 18 18:10:31 2018 -0700 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Mon Mar 19 03:31:04 2018 +0000 |
tree | 29f38dd94e85f96044455781538883e1e8dacf07 | |
parent | 27b586200fb9e640ca37168c016d1b21b40545d5 [diff] |
[fidl] Fix encoding of vectors This is similar to the fix to decoding and validating done in https://fuchsia-review.googlesource.com/c/zircon/+/133535 Change-Id: I2b71b4759f63790b62084036347ed2281faf4079
diff --git a/system/ulib/fidl/encoding.cpp b/system/ulib/fidl/encoding.cpp index 1c64d19..e4b5ded 100644 --- a/system/ulib/fidl/encoding.cpp +++ b/system/ulib/fidl/encoding.cpp
@@ -485,7 +485,7 @@ if (frame->vector_state.element) { // Continue to encoding the vector elements as an array. *frame = Frame(frame->vector_state.element, size, - static_cast<uint32_t>(vector_ptr->count), frame->offset); + frame->vector_state.element_size, frame->offset); } else { // If there is no element type pointer, there is // nothing to encode in the vector secondary