From 19ea60bc7c0186070d95f5effc815c546de1dcb0 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Wed, 21 Dec 2005 05:37:10 +0000 Subject: [PATCH] Avoid check on _fcBankId nullness and fix case where it used to crash. --- ChangeLog | 7 +++++++ src/fccharset.c | 2 +- src/fcint.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9bd677..f58f237 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,13 @@ Bump version to 2.3.93. +2005-12-20 Patrick Lam + * src/fccharset.c (FcLangCharSetPopulate): + * src/fcint.h (FcCacheBankToIndex): + + Avoid check on _fcBankId nullness and fix case where it used to + crash. + 2005-12-20 Patrick Lam * src/fcxml.c (FcConfigParseAndLoad): diff --git a/src/fccharset.c b/src/fccharset.c index 11e8763..8a66cc2 100644 --- a/src/fccharset.c +++ b/src/fccharset.c @@ -48,7 +48,7 @@ FcCharSetEnsureBank (int bi); void FcLangCharSetPopulate (void) { - int bi = FcCacheBankToIndex (FC_BANK_LANGS); + int bi = FcCacheBankToIndexMTF (FC_BANK_LANGS); FcCharSetEnsureBank (bi); charsets[bi] = 0; numbers[bi] = (FcChar16 *)&langBankNumbers; diff --git a/src/fcint.h b/src/fcint.h index 5c2425b..c3430ae 100644 --- a/src/fcint.h +++ b/src/fcint.h @@ -469,7 +469,7 @@ FcCacheBankToIndexMTF (int bank); static __inline__ int FcCacheBankToIndex (int bank) { - return (_fcBankId && _fcBankId[*_fcBankIdx] == bank) ? *_fcBankIdx : FcCacheBankToIndexMTF(bank); + return (_fcBankId[*_fcBankIdx] == bank) ? *_fcBankIdx : FcCacheBankToIndexMTF(bank); } const char * -- 2.39.5