/*
*******************************************************************************
-* Copyright (C) 1996-2010, International Business Machines Corporation and *
+* Copyright (C) 1996-2011, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
#include "unicode/coleitr.h"
#include "unicode/ustring.h"
#include "ucol_imp.h"
+#include "uassert.h"
#include "cmemory.h"
}
/* start and end of string */
- coliter->endp = coliter->string + length;
+ coliter->endp = coliter->string == NULL ? NULL : coliter->string + length;
/* handle writable buffer here */
if (othercoliter->pos >= othercoliter->string &&
othercoliter->pos <= othercoliter->endp)
{
+ U_ASSERT(coliter->string != NULL);
coliter->pos = coliter->string +
(othercoliter->pos - othercoliter->string);
}
}
if (othercoliter->fcdPosition != NULL) {
+ U_ASSERT(coliter->string != NULL);
coliter->fcdPosition = coliter->string +
(othercoliter->fcdPosition
- othercoliter->string);