diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-11 15:48:26 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-11 15:48:26 +0000 |
commit | 64246e68515f9c73315a06f4f62738e45655f983 (patch) | |
tree | b26eda28c0163b59a71bb61ce6ed5ca1301723fd /include | |
parent | 7fe4aeaec6ec0300ecd544579b462aa526b07080 (diff) |
dynamic memory allocation on buffer overrun.
99.95% of strings are still printed without any need of memory allocation
git-svn-id: http://svn.miranda-ng.org/main/trunk@6440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include')
-rw-r--r-- | include/m_string.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/m_string.h b/include/m_string.h index ae5e245916..fd7ab6a235 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -1975,12 +1975,13 @@ public: this->ReleaseBufferSetLength(nCurrentLength+nAppendLength);
}
- void FormatV(PCXSTR pszFormat, va_list args)
+ PCXSTR FormatV(PCXSTR pszFormat, va_list args)
{
int nLength = StringTraits::GetFormattedLength(pszFormat, args);
PXSTR pszBuffer = this->GetBuffer(nLength);
StringTraits::Format(pszBuffer, nLength+1, pszFormat, args);
this->ReleaseBufferSetLength(nLength);
+ return GetString();
}
// OLE BSTR support
|