diff options
Diffstat (limited to 'core/src/fxge/ge')
-rw-r--r-- | core/src/fxge/ge/fx_ge_fontmap.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp index ec4530b8ed..acae306d6f 100644 --- a/core/src/fxge/ge/fx_ge_fontmap.cpp +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp @@ -4,6 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +#include <limits> + #include "../../../include/fxge/fx_ge.h" #include "../../../include/fxge/fx_freetype.h" #include "text_int.h" @@ -1462,7 +1464,7 @@ void CFX_FolderFontInfo::ScanFile(CFX_ByteString& path) if (GET_TT_LONG(buffer) == 0x74746366) { FX_DWORD nFaces = GET_TT_LONG(buffer + 8); - if (nFaces > FX_DWORD_MAX / 4) { + if (nFaces > std::numeric_limits<FX_DWORD>::max() / 4) { FXSYS_fclose(pFile); return; } |