Mercurial > dwindows
changeset 1627:b41ecd439b47
dw_window_get_text() was truncating the text by 1 byte in Unicode mode on Windows.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 28 Mar 2012 02:47:55 +0000 |
parents | fdeeba6c6d09 |
children | 2571d6b23065 |
files | win/dw.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Wed Mar 28 02:28:55 2012 +0000 +++ b/win/dw.c Wed Mar 28 02:47:55 2012 +0000 @@ -6783,7 +6783,7 @@ /* Figure out the wide length, allocate a temp buffer * and fill it with the current text. */ - len = GetWindowTextLength(handle); + len = GetWindowTextLength(handle) + 1; if((tempbuf = _alloca(len * sizeof(TCHAR)))) GetWindowText(handle, tempbuf, len);