fix UTF-16 decoding bug again

This commit is contained in:
Martin Michelsen
2023-11-16 23:22:51 -08:00
parent 132395a53a
commit 6b1a3e615b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ string TextTranscoder::operator()(const void* src, size_t src_size) {
const void* orig_src = src;
deque<string> blocks;
while (src_size > 0) {
// Assume 2x input size on average, but always alocate at least 4 bytes
// Assume 2x input size on average, but always allocate at least 4 bytes
string& block = blocks.emplace_back(max<size_t>((src_size << 2), 4), '\0');
char* dest = block.data();
size_t dest_size = block.size();