1
0
Fork 0
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:
jules 2016-12-22 17:16:48 +00:00
parent 158bc981de
commit ab0c519cef

View file

@ -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);