From 013eb8dd429bcaf004a3d0a592b83e11da240090 Mon Sep 17 00:00:00 2001 From: Yves Arrouye Date: Fri, 11 Aug 2000 04:15:06 +0000 Subject: [PATCH] ICU-322 fixed ucnv_getStandard(). X-SVN-Rev: 2185 --- icu4c/source/common/ucnv_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/ucnv_io.c b/icu4c/source/common/ucnv_io.c index 4b11c02621..6a58b4e149 100644 --- a/icu4c/source/common/ucnv_io.c +++ b/icu4c/source/common/ucnv_io.c @@ -341,14 +341,14 @@ ucnv_io_countStandards(UErrorCode *pErrorCode) { U_CFUNC const char * ucnv_io_getStandard(uint16_t n, UErrorCode *pErrorCode) { if (haveAliasData(pErrorCode) && tagTable) { - const char *p = (const char *) tagTable + 1 + *tagTable * *converterTable; int16_t count = (int16_t) *tagTable; + const char *tags = (const char *) (tagTable + 1 + count * *converterTable); while (n-- && count--) { - p += strlen(p); + tags += strlen(tags) + 1; } - return count >= 0 ? p : NULL; + return count ? tags : NULL; } return NULL;