ICU-5170 fix crashing failure in cintltst /tstxtbd, problem with ubrk_safeClone()

X-SVN-Rev: 19589
This commit is contained in:
Andy Heninger 2006-04-25 22:02:42 +00:00
parent c687f5051e
commit eab5948118

View File

@ -1650,7 +1650,8 @@ BreakIterator * RuleBasedBreakIterator::createBufferClone(void *stackBuffer,
//
RuleBasedBreakIterator localIter; // Empty break iterator, source for memcpy
RuleBasedBreakIterator *clone = (RuleBasedBreakIterator *)buf;
uprv_memcpy(clone, &localIter, sizeof(RuleBasedBreakIterator)); // clone = empty, but initialized, iterator.
uprv_memcpy(clone, &localIter, sizeof(RuleBasedBreakIterator)); // init C++ gorp, BreakIterator base class part
clone->init(); // Init RuleBasedBreakIterator part, (user constructor)
*clone = *this; // clone = the real one we want.
if (status != U_SAFECLONE_ALLOCATED_WARNING) {
clone->fBufferClone = TRUE;