Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1393)

Unified Diff: source/common/unistr_case.cpp

Issue 178970043: ICU ticket #11336: UnicodeString: recombine stack buffer arrays (Closed) Base URL: http://source.icu-project.org/repos/icu/icu/trunk
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: source/common/unistr_case.cpp
===================================================================
--- source/common/unistr_case.cpp (revision 36734)
+++ source/common/unistr_case.cpp (working copy)
@@ -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 @@
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();

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b