Fixed crash in EventUpdateManager on receive on some platforms.
This commit is contained in:
parent
ccd7fcb2f3
commit
c3bf46124d
1 changed files with 4 additions and 1 deletions
|
@ -239,7 +239,10 @@ std::string TelldusCore::sformatf(const char *format, va_list ap) {
|
|||
|
||||
while (1) {
|
||||
/* Try to print in the allocated space. */
|
||||
n = vsnprintf(p, size, format, ap);
|
||||
va_list ap2;
|
||||
va_copy(ap2, ap);
|
||||
n = vsnprintf(p, size, format, ap2);
|
||||
va_end(ap2);
|
||||
|
||||
/* If that worked, return the string. */
|
||||
if (n > -1 && n < size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue