Browse Source

String::charToString fix.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
3957158ec9
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      juce_amalgamated.cpp
  2. +1
    -1
      src/text/juce_String.cpp

+ 1
- 1
juce_amalgamated.cpp 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();


+ 1
- 1
src/text/juce_String.cpp 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();


Loading…
Cancel
Save