mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r8576) -Fix: wrong type given to MallocT (VC2003, UNICODE build)
This commit is contained in:
parent
8b8e41ceb8
commit
ccffde6d7e
@ -78,7 +78,7 @@ static FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
|
|||||||
* normal char to match the data returned by RegEnumValue,
|
* normal char to match the data returned by RegEnumValue,
|
||||||
* otherwise just use parameter */
|
* otherwise just use parameter */
|
||||||
#if defined(UNICODE)
|
#if defined(UNICODE)
|
||||||
font_namep = MallocT<char>(MAX_PATH);
|
font_namep = MallocT<TCHAR>(MAX_PATH);
|
||||||
MB_TO_WIDE_BUFFER(font_name, font_namep, MAX_PATH * sizeof(TCHAR));
|
MB_TO_WIDE_BUFFER(font_name, font_namep, MAX_PATH * sizeof(TCHAR));
|
||||||
#else
|
#else
|
||||||
font_namep = (char*)font_name; // only cast because in unicode pointer is not const
|
font_namep = (char*)font_name; // only cast because in unicode pointer is not const
|
||||||
|
Loading…
Reference in New Issue
Block a user