[Yunq] Add support for empty requests and responses.
This commit is contained in:
parent
6d108f6965
commit
cc4b5bd811
11 changed files with 91 additions and 22 deletions
|
|
@ -44,9 +44,9 @@ void OpenFileRequest::ParseFromBytesInternal(const glcr::ByteBuffer& bytes, uint
|
|||
// Parse options.
|
||||
auto options_pointer = bytes.At<ExtPointer>(offset + header_size + (8 * 1));
|
||||
|
||||
options_.Resize(options_pointer.length);
|
||||
options_.Resize(options_pointer.length / sizeof(uint64_t));
|
||||
for (uint64_t i = offset + options_pointer.offset;
|
||||
i < offset + options_pointer.offset + (sizeof(uint64_t) * options_pointer.length);
|
||||
i < offset + options_pointer.offset + options_pointer.length;
|
||||
i += sizeof(uint64_t)) {
|
||||
options_.PushBack(bytes.At<uint64_t>(i));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue