From 308a5811c1d52adf89421fb1219c32c95e8939a1 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Sat, 26 Aug 2000 01:54:05 +0000 Subject: [PATCH] ICU-463 Fixed a typo in extract X-SVN-Rev: 2356 --- icu4c/source/common/unicode/unistr.h | 2 +- icu4c/source/common/unistr.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index 0106acc77a..269eb9ef48 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -2571,7 +2571,7 @@ UnicodeString::extract(UTextOffset start, int32_t length, char *dst, const char *codepage) const -{return extract(start, length, dst, 0x0FFFFFFF, codepage);} +{return extract(start, length, dst, INT32_MAX, codepage);} inline void UnicodeString::extractBetween(UTextOffset start, diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp index 64f1b9d400..9c5d578734 100644 --- a/icu4c/source/common/unistr.cpp +++ b/icu4c/source/common/unistr.cpp @@ -290,7 +290,7 @@ UnicodeString::allocate(int32_t capacity) { fCapacity = (words - 1) * (sizeof(int32_t) / U_SIZEOF_UCHAR); fFlags = kLongString; } else { - fArray = 0; + fLength = 0; fCapacity = 0; fFlags = kIsBogus; return FALSE; @@ -1264,7 +1264,7 @@ UnicodeString::extract(UTextOffset start, char target = 0; int32_t size = 0; - myTargetLimit = myTarget + sizeof(char); + myTargetLimit = &target + sizeof(char); while (mySource < mySourceLimit && U_SUCCESS(status)) { myTarget = ⌖ ucnv_fromUnicode(converter, &myTarget, myTargetLimit,