diff --git a/src/cpp/Cdr.cpp b/src/cpp/Cdr.cpp index 34e2ebe8..198fe3c1 100644 --- a/src/cpp/Cdr.cpp +++ b/src/cpp/Cdr.cpp @@ -1643,13 +1643,8 @@ Cdr& Cdr::deserialize( // Allocate memory. string_t = reinterpret_cast(calloc(length + 1, sizeof(wchar_t))); // WStrings never serialize terminating zero - for (size_t idx = 0; idx < length; ++idx) - { - uint16_t temp; - offset_ >> temp; - string_t[idx] = static_cast(temp); - offset_ += sizeof(uint16_t); - } + deserialize_array(string_t, length); + return *this; }