mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
SimpleShapedText: Fix overallocating s32 buffer
Prior to this commit we overallocated the s32 buffer. The buffer was unnecessarily padded by zeros, and the line stating this, wasn't actually dropping the null terminator.
This commit is contained in:
parent
bc4ea1a66f
commit
10b6289295
1 changed files with 1 additions and 1 deletions
|
|
@ -879,7 +879,7 @@ struct Shaper
|
|||
|
||||
const auto string32 = std::invoke ([this]
|
||||
{
|
||||
std::vector<juce_wchar> s32 (CharPointer_UTF32::getBytesRequiredFor (string.getCharPointer()));
|
||||
std::vector<juce_wchar> s32 ((size_t) string.length() + 1);
|
||||
string.copyToUTF32 (s32.data(), s32.size() * sizeof (juce_wchar));
|
||||
jassert (! s32.empty());
|
||||
s32.pop_back(); // dropping the null terminator
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue