Fix protobuf encoding size mismatch by passing force parameter in encode_string (#9074)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-06-16 09:19:04 +12:00
1 parent fcce4a8be6
commit be58cdda3b
3 files changed
+169 -1

No files matched your search

+1 -1
View File
@@ -216,7 +216,7 @@ class ProtoWriteBuffer {
this->buffer_->insert(this->buffer_->end(), data, data + len);
}
void encode_string(uint32_t field_id, const std::string &value, bool force = false) {
this->encode_string(field_id, value.data(), value.size());
this->encode_string(field_id, value.data(), value.size(), force);
}
void encode_bytes(uint32_t field_id, const uint8_t *data, size_t len, bool force = false) {
this->encode_string(field_id, reinterpret_cast<const char *>(data), len, force);