From 0dbd2e37f916d6b52eac8bad7fa529aa952a0b1b Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Tue, 9 Aug 2016 15:45:24 +0100 Subject: [PATCH] usp10: Free the final page. Signed-off-by: Huw Davies Signed-off-by: Aric Stewart Signed-off-by: Alexandre Julliard --- dlls/usp10/usp10.c | 2 +- dlls/usp10/usp10_internal.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index dc1cc0671db..0471fc62e9f 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -1019,7 +1019,7 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc) { heap_free(((ScriptCache *)*psc)->widths[i]); } - for (i = 0; i < 0x10; i++) + for (i = 0; i < NUM_PAGES; i++) { unsigned int j; if (((ScriptCache *)*psc)->page[i]) diff --git a/dlls/usp10/usp10_internal.h b/dlls/usp10/usp10_internal.h index c1a5ccf635a..1c0d1c546c9 100644 --- a/dlls/usp10/usp10_internal.h +++ b/dlls/usp10/usp10_internal.h @@ -125,6 +125,8 @@ #define GLYPH_BLOCK_MASK (GLYPH_BLOCK_SIZE - 1) #define GLYPH_MAX 65536 +#define NUM_PAGES 17 + #define GSUB_E_NOFEATURE -2 #define GSUB_E_NOGLYPH -1 @@ -169,7 +171,7 @@ typedef struct { OUTLINETEXTMETRICW *otm; SCRIPT_FONTPROPERTIES sfp; BOOL sfnt; - CacheGlyphPage *page[0x11]; + CacheGlyphPage *page[NUM_PAGES]; ABC *widths[GLYPH_MAX / GLYPH_BLOCK_SIZE]; LPVOID GSUB_Table; LPVOID GDEF_Table;