mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 15:15:37 +00:00
Fixed an issue where formatting translation strings could lead to crashes on some platforms
This commit is contained in:
parent
5fefb5960b
commit
0582856b84
|
@ -647,8 +647,10 @@ namespace Utils
|
|||
va_copy(copy, args);
|
||||
|
||||
const int length {vsnprintf(nullptr, 0, &stringArg[0], copy)};
|
||||
va_end(copy);
|
||||
std::string buffer(length, '\0');
|
||||
|
||||
va_copy(copy, args);
|
||||
vsnprintf(&buffer[0], length + 1, &stringArg[0], copy);
|
||||
|
||||
va_end(copy);
|
||||
|
|
Loading…
Reference in a new issue