diff --git a/Source/lang.cpp b/Source/lang.cpp index a76fe6e5..a3cf4e97 100644 --- a/Source/lang.cpp +++ b/Source/lang.cpp @@ -1016,7 +1016,7 @@ LanguageTable * CEXEBuild::LoadLangFile(TCHAR *filename) { } #ifdef _UNICODE - if (!unicode) // convert font name from ANSI to Unicode now that we know the language codepage + if (!unicode && nlf->m_szFont) // convert font name from ANSI to Unicode now that we know the language codepage { TCHAR* str = nlf->m_szFont; nlf->m_szFont = _tcsdup(CtoTString2(TtoCString(str),table->nlf.m_uCodePage)); diff --git a/Source/tstring.h b/Source/tstring.h index bea3a5d2..8dcb6842 100644 --- a/Source/tstring.h +++ b/Source/tstring.h @@ -38,7 +38,7 @@ typedef std::ofstream tofstream; typedef std::ifstream tifstream; // Use the following macros to open text files. #define FOPENTEXT(file, mode) fopen(file, mode) -#define FOPENTEXT2(file, mode, unicode) *unicode=FALSE, fopen(file, mode) +#define FOPENTEXT2(file, mode, unicode) (*unicode=FALSE, fopen(file, mode)) #endif #ifndef _UNICODE