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:
parent
dd9fd3d8a7
commit
b0703b92c3
1
NEWS
1
NEWS
@ -3,6 +3,7 @@ ver 0.20.10 (not yet released)
|
|||||||
- ffmpeg: support MusicBrainz ID3v2 tags
|
- ffmpeg: support MusicBrainz ID3v2 tags
|
||||||
* tags
|
* tags
|
||||||
- aiff: fix FORM chunk size endianess (is big-endian)
|
- aiff: fix FORM chunk size endianess (is big-endian)
|
||||||
|
* fix crash on Windows
|
||||||
|
|
||||||
ver 0.20.9 (2017/06/04)
|
ver 0.20.9 (2017/06/04)
|
||||||
* decoder
|
* decoder
|
||||||
|
@ -57,7 +57,7 @@ FormatStringV(const char *fmt, va_list args)
|
|||||||
const size_t length = strlen(buffer);
|
const size_t length = strlen(buffer);
|
||||||
char *p = new char[length + 1];
|
char *p = new char[length + 1];
|
||||||
memcpy(p, buffer, length + 1);
|
memcpy(p, buffer, length + 1);
|
||||||
return AllocatedString<>::Donate(buffer);
|
return AllocatedString<>::Donate(p);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user