summaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefTechnicalDetails.qml
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-12-28 21:18:07 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-22 12:59:23 +1300
commitb0afca5815ed7ad11693745474124440a51b48a9 (patch)
tree2b6aa9ef4345fb21da91e8aebb50469bd0603354 /tests/tst_qPrefTechnicalDetails.qml
parenta5a191e8502ff7e078c92e41c2b078db5abdfab9 (diff)
downloadsubsurface-b0afca5815ed7ad11693745474124440a51b48a9.tar.gz
windows.c: fix wrong usage of wcslen() for utf8 conversation
wcslen() returns the number of characters in a wchar_t string. In the case of WideCharToMultiByte() an estimate for the size of the utf8 buffer is needed. Using wcslen() is incorrect for such a buffer, because for any non-ASCII character the estimate will be off by 1 byte. Call the following instead to obtain the proper UTF8 buffer size for the conversation: WideCharToMultiByte(CP_UTF8, 0, utf16, -1, NULL, 0, NULL, NULL); Also fix some missing "\n" in fprintf() calls. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'tests/tst_qPrefTechnicalDetails.qml')
0 files changed, 0 insertions, 0 deletions