summaryrefslogtreecommitdiff
path: root/media-gfx/fontforge/files/20200314-stylemap.patch
blob: d3311cab02d26d5fa19d8e99e9f272baa0492514 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 3b83adc89771000eb95fcd87bb675f771ba85aaf Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Sun, 29 Mar 2020 16:36:14 -0400
Subject: [PATCH] Avoid integer size conflict when setting stylemap

stylemap is a 16-bit integer, but hexmap writes 32-bits.

Bug: https://bugs.gentoo.org/642756
---
 fontforge/sfd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fontforge/sfd.c b/fontforge/sfd.c
index 9517d8cb1..b638fe447 100644
--- a/fontforge/sfd.c
+++ b/fontforge/sfd.c
@@ -8104,7 +8104,9 @@ bool SFD_GetFontMetaData( FILE *sfd,
     }
     else if ( strmatch(tok,"StyleMap:")==0 )
     {
-    gethex(sfd,(uint32 *)&sf->pfminfo.stylemap);
+	uint32 u;
+	gethex(sfd,&u);
+	sf->pfminfo.stylemap = u;
     }
     /* Legacy attribute for StyleMap. Deprecated. */
     else if ( strmatch(tok,"OS2StyleName:")==0 )
-- 
2.26.0.rc2