util/FormatString: pass the allocated buffer to AllocatedString::Donate()
.. and not the stack buffer. This made the AllocatedString destructor crash. Closes #52
This commit is contained in:
@@ -57,7 +57,7 @@ FormatStringV(const char *fmt, va_list args)
|
||||
const size_t length = strlen(buffer);
|
||||
char *p = new char[length + 1];
|
||||
memcpy(p, buffer, length + 1);
|
||||
return AllocatedString<>::Donate(buffer);
|
||||
return AllocatedString<>::Donate(p);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user