diff options
-rw-r--r-- | popup/src/popup_wnd2.cpp | 11 | ||||
-rw-r--r-- | popup/version.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/popup/src/popup_wnd2.cpp b/popup/src/popup_wnd2.cpp index 8dab680..93e13ba 100644 --- a/popup/src/popup_wnd2.cpp +++ b/popup/src/popup_wnd2.cpp @@ -1388,12 +1388,13 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara #define CF_TCHAR CF_TEXT
#endif
HGLOBAL clipbuffer;
- static TCHAR * buffer, *text;
- char* sztext = NULL;
- text = this->m_lpwzText;
- if (!text)
+ static TCHAR * buffer, *text = (TCHAR*)mir_alloc((_tcslen(this->m_lpwzText) + _tcslen(this->m_lpwzTitle)+2)*sizeof(TCHAR));
+ char* sztext = (char*)mir_alloc((lstrlenA(this->m_lpzText) + lstrlenA(this->m_lpzTitle)+2)*sizeof(char));
+ if ((this->m_lpwzText) || (this->m_lpwzTitle))
+ mir_sntprintf(text, _tcslen(this->m_lpwzText) + _tcslen(this->m_lpwzTitle)+1, _T("%s\n%s"), this->m_lpwzTitle, this->m_lpwzText);
+ else if ((this->m_lpzText) || (this->m_lpzTitle))
{
- sztext = this->m_lpzText;
+ mir_snprintf(sztext, lstrlenA(this->m_lpzText) + lstrlenA(this->m_lpzTitle)+1, "%s\n%s", this->m_lpzTitle, this->m_lpzText);
text = mir_a2t(sztext);
}
OpenClipboard(m_hwnd);
diff --git a/popup/version.h b/popup/version.h index cd2cac8..7b49620 100644 --- a/popup/version.h +++ b/popup/version.h @@ -65,7 +65,7 @@ Last change by : $Author: Merlin_de $ #define __MAJOR_VERSION 2
#define __MINOR_VERSION 1
#define __RELEASE_NUM 1
- #define __BUILD_NUM 5
+ #define __BUILD_NUM 6
#define __STRINGIFY(x) #x
#define __STRINGIFY2(x) __STRINGIFY(x)
|