usp10: Free the final page.

Huw Davies huw at codeweavers.com
Tue Aug 9 09:45:24 CDT 2016


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 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 f5eba8d..b4ddca3 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 c1a5ccf..1c0d1c5 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;
-- 
2.8.2




More information about the wine-patches mailing list