1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-15 00:24:19 +00:00

String::charToString fix.

This commit is contained in:
Julian Storer 2011-03-16 18:58:19 +00:00
parent 8df744472d
commit 3957158ec9
2 changed files with 2 additions and 2 deletions

View file

@ -11784,7 +11784,7 @@ String::String (const CharPointer_UTF32& start, const CharPointer_UTF32& end) :
const String String::charToString (const juce_wchar character)
{
String result (PreallocationBytes (sizeof (CharPointerType::CharType)));
String result (PreallocationBytes (CharPointerType::getBytesRequiredFor (character)));
CharPointerType t (result.text);
t.write (character);
t.writeNull();

View file

@ -318,7 +318,7 @@ String::String (const CharPointer_UTF32& start, const CharPointer_UTF32& end) :
const String String::charToString (const juce_wchar character)
{
String result (PreallocationBytes (sizeof (CharPointerType::CharType)));
String result (PreallocationBytes (CharPointerType::getBytesRequiredFor (character)));
CharPointerType t (result.text);
t.write (character);
t.writeNull();