mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
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.
This commit is contained in:
@ -608,7 +608,7 @@ static void win_draw_text(void *handle, int x, int y, int fonttype,
|
|||||||
HFONT oldfont;
|
HFONT oldfont;
|
||||||
TEXTMETRIC tm;
|
TEXTMETRIC tm;
|
||||||
SIZE size;
|
SIZE size;
|
||||||
TCHAR wText[256];
|
WCHAR wText[256];
|
||||||
MultiByteToWideChar (CP_UTF8, 0, text, -1, wText, 256);
|
MultiByteToWideChar (CP_UTF8, 0, text, -1, wText, 256);
|
||||||
|
|
||||||
oldfont = SelectObject(fe->hdc, fe->fonts[i].font);
|
oldfont = SelectObject(fe->hdc, fe->fonts[i].font);
|
||||||
|
Reference in New Issue
Block a user