From 25e97ca0ad6ddd502960a0741bef1623f005020f Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 23 May 2005 02:21:07 +0000 Subject: [PATCH] (OTF_check_features): Fix indexing to feature_list->Feature. (OTF_tag): Handle the case that the length of NAME is short. --- src/otfopen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/otfopen.c b/src/otfopen.c index 5727198..22dddca 100644 --- a/src/otfopen.c +++ b/src/otfopen.c @@ -2968,7 +2968,11 @@ OTF_tag (char *name) if (! name) return (OTF_Tag) 0; - return (OTF_Tag) ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); + return (OTF_Tag) ((p[0] << 24) + | (! p[1] ? 0 + : ((p[1] << 16) + | (! p[2] ? 0 + : (p[2] << 8) | p[3])))); } void -- 1.7.10.4