Chromium Code Reviews| Index: core/src/fxge/ge/fx_ge_fontmap.cpp |
| diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp |
| index 08e9d4698c9ad8f5f8c75ed18054e50ebb4e2b47..af0a9efdaadc71e0c0cfa3127adcc9eaec471cf9 100644 |
| --- a/core/src/fxge/ge/fx_ge_fontmap.cpp |
| +++ b/core/src/fxge/ge/fx_ge_fontmap.cpp |
| @@ -413,10 +413,10 @@ CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr) |
| FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces)); |
| } |
| CFX_FontMapper::~CFX_FontMapper() { |
| - for (int i = 0; i < 14; i++) |
| - if (m_FoxitFaces[i]) { |
| + for (size_t i = 0; i < FX_ArraySize(m_FoxitFaces); ++i) { |
| + if (m_FoxitFaces[i]) |
| FXFT_Done_Face(m_FoxitFaces[i]); |
|
Lei Zhang
2015/10/26 22:35:07
(For later) FT_Done_Face() checks its input, so we
|
| - } |
| + } |
| if (m_MMFaces[0]) { |
| FXFT_Done_Face(m_MMFaces[0]); |
| } |