From 3159971d851c9aab7cae0c766e352d26964794e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giumo=20X=2E=20Clanjor=20=28=E5=93=86=E5=95=A6=E6=AF=94?= =?UTF-8?q?=E7=8C=AB/=E5=85=B0=E5=A8=81=E4=B8=BE=29?= Date: Mon, 20 Jul 2015 23:18:47 +0800 Subject: [PATCH] stb_truetype: fix wrong result returned by stbtt_GetFontOffsetForIndex fixed the typo in stbtt_GetFontOffsetForIndex, where the field size should be 4 instead of 14. --- stb_truetype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_truetype.h b/stb_truetype.h index 56ef47b..19687f4 100644 --- a/stb_truetype.h +++ b/stb_truetype.h @@ -952,7 +952,7 @@ int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection, int index) stbtt_int32 n = ttLONG(font_collection+8); if (index >= n) return -1; - return ttULONG(font_collection+12+index*14); + return ttULONG(font_collection+12+index*4); } } return -1;