Index: source/common/unistr_case.cpp |
diff --git a/source/common/unistr_case.cpp b/source/common/unistr_case.cpp |
index 8b1023a5e108dadca145b08f1b254f5a8e97f345..1b52eb60decb8e983b8a13708d1d39a2ecb41ba7 100644 |
--- a/source/common/unistr_case.cpp |
+++ b/source/common/unistr_case.cpp |
@@ -1,7 +1,7 @@ |
/* |
******************************************************************************* |
* |
-* Copyright (C) 1999-2011, International Business Machines |
+* Copyright (C) 1999-2014, International Business Machines |
* Corporation and others. All Rights Reserved. |
* |
******************************************************************************* |
@@ -100,11 +100,11 @@ UnicodeString::caseMap(const UCaseMap *csm, |
UChar *oldArray; |
int32_t oldLength; |
- if(fFlags&kUsingStackBuffer) { |
+ if(fUnion.fFields.fLengthAndFlags&kUsingStackBuffer) { |
// copy the stack buffer contents because it will be overwritten |
- u_memcpy(oldStackBuffer, fUnion.fStackBuffer, fShortLength); |
oldArray = oldStackBuffer; |
- oldLength = fShortLength; |
+ oldLength = getShortLength(); |
+ u_memcpy(oldStackBuffer, fUnion.fStackFields.fBuffer, oldLength); |
} else { |
oldArray = getArrayStart(); |
oldLength = length(); |