From 631a7afc9e847fd63af24a27957dfefae7070243 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 28 Oct 2009 01:20:05 +0000 Subject: [PATCH] (mscript__from_otf_tag): Adjusted for the new format of the database . --- src/language.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/language.c b/src/language.c index 168a27e..1e3d85c 100644 --- a/src/language.c +++ b/src/language.c @@ -317,11 +317,21 @@ mscript__from_otf_tag (MSymbol otf_tag) && (p = MPLIST_NEXT (p)) /* char list */ && ! MPLIST_TAIL_P (p) && (p = MPLIST_NEXT (p)) /* otf tag */ - && MPLIST_SYMBOL_P (p) - && otf_tag == MPLIST_SYMBOL (p)) + && ! MPLIST_TAIL_P (p)) { - script = MPLIST_SYMBOL (pl); - break; + if (MPLIST_SYMBOL_P (p)) + { + if (otf_tag == MPLIST_SYMBOL (p)) + return MPLIST_SYMBOL (pl); + } + else if (MPLIST_PLIST (p)) + { + MPlist *p0; + + MPLIST_DO (p0, MPLIST_PLIST (p)) + if (MPLIST_SYMBOL_P (p0) && otf_tag == MPLIST_SYMBOL (p0)) + return MPLIST_SYMBOL (pl); + } } } return script; -- 1.7.10.4