mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-19 01:04:20 +00:00
Workaround for an android-specific bug in String::formatted()
This commit is contained in:
parent
158bc981de
commit
ab0c519cef
1 changed files with 3 additions and 1 deletions
|
|
@ -1871,7 +1871,9 @@ String String::formatted (const String pf, ... )
|
|||
const int num = (int) _vsnwprintf (temp.getData(), bufferSize - 1, pf.toWideCharPointer(), args);
|
||||
#elif JUCE_ANDROID
|
||||
HeapBlock<char> temp (bufferSize);
|
||||
const int num = (int) vsnprintf (temp.getData(), bufferSize - 1, pf.toUTF8(), args);
|
||||
int num = (int) vsnprintf (temp.getData(), bufferSize - 1, pf.toUTF8(), args);
|
||||
if (num >= bufferSize)
|
||||
num = -1;
|
||||
#else
|
||||
HeapBlock<wchar_t> temp (bufferSize);
|
||||
const int num = (int) vswprintf (temp.getData(), bufferSize - 1, pf.toWideCharPointer(), args);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue