mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-322 oops... Initialize the tag table pointer when version is >2.0,
not >3.0 (I bumped the version down to 2.1 yesterday...) X-SVN-Rev: 2175
This commit is contained in:
parent
fe2193ec6b
commit
e04218d90d
1 changed files with 10 additions and 2 deletions
|
@ -129,7 +129,7 @@ haveAliasData(UErrorCode *pErrorCode) {
|
|||
table=NULL;
|
||||
converterTable = aliasTable + 1 + 2 * *aliasTable;
|
||||
|
||||
if (info.formatVersion[0] > 2) {
|
||||
if (info.formatVersion[0] > 1 && info.formatVersion[1] > 0) {
|
||||
tagTable = converterTable + 1 + 2 * *converterTable;
|
||||
}
|
||||
}
|
||||
|
@ -161,6 +161,8 @@ static int16_t getTagNumber(const char *tagname) {
|
|||
int16_t tag, count = (int16_t) *tagTable;
|
||||
const char *tags = (const char *) (tagTable + 1 + count * *converterTable);
|
||||
|
||||
#if 0
|
||||
|
||||
char name[100];
|
||||
int i;
|
||||
|
||||
|
@ -170,8 +172,14 @@ static int16_t getTagNumber(const char *tagname) {
|
|||
}
|
||||
name[i] = 0;
|
||||
|
||||
#else
|
||||
|
||||
const char *name = tagname;
|
||||
|
||||
#endif
|
||||
|
||||
for (tag = 0; count--; ++tag) {
|
||||
if (!charsetNameCmp(name, tags)) {
|
||||
if (!uprv_stricmp(name, tags)) {
|
||||
return tag;
|
||||
}
|
||||
tags += strlen(tags) + 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue