mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Fix UTF32 string creation
This commit is contained in:
@@ -132,9 +132,9 @@ public:
|
||||
return getEmpty();
|
||||
|
||||
const size_t numBytes = (size_t) (end.getAddress() - start.getAddress());
|
||||
const CharPointerType dest (createUninitialisedBytes (numBytes + 1));
|
||||
const CharPointerType dest (createUninitialisedBytes (numBytes + sizeof (CharType)));
|
||||
memcpy (dest.getAddress(), start, numBytes);
|
||||
dest.getAddress()[numBytes] = 0;
|
||||
dest.getAddress()[numBytes / sizeof (CharType)] = 0;
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user