diff options
| author | Simon Tatham <anakin@pobox.com> | 2015-08-01 11:14:30 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2015-08-01 11:14:30 +0100 |
| commit | c296301a06ce49b87c954c9d15452521dfeddf1a (patch) | |
| tree | 1e2bc74c724d8f1f1d03278b837fe5e736f66de2 | |
| parent | 5e1c335eea905ee031e440399f7a575c5c7a1ad3 (diff) | |
| download | puzzles-c296301a06ce49b87c954c9d15452521dfeddf1a.zip puzzles-c296301a06ce49b87c954c9d15452521dfeddf1a.tar.gz puzzles-c296301a06ce49b87c954c9d15452521dfeddf1a.tar.bz2 puzzles-c296301a06ce49b87c954c9d15452521dfeddf1a.tar.xz | |
Replace a TCHAR with a WCHAR.
MultiByteToWideChar expects a WCHAR[256] output buffer if you pass it
an output length of 256. TCHAR[256] is entirely the wrong size, though
for some reason Visual Studio seems not to have thrown a compile error
pointing that out.
Thanks to Jason Hood for spotting this.
| -rw-r--r-- | windows.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -608,7 +608,7 @@ static void win_draw_text(void *handle, int x, int y, int fonttype, HFONT oldfont; TEXTMETRIC tm; SIZE size; - TCHAR wText[256]; + WCHAR wText[256]; MultiByteToWideChar (CP_UTF8, 0, text, -1, wText, 256); oldfont = SelectObject(fe->hdc, fe->fonts[i].font); |