X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/common/unisetspan.cpp diff --git a/icuSources/common/unisetspan.cpp b/icuSources/common/unisetspan.cpp index 90a9fc47..e107abe5 100644 --- a/icuSources/common/unisetspan.cpp +++ b/icuSources/common/unisetspan.cpp @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2007-2011, International Business Machines +* Copyright (C) 2007-2012, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -503,9 +503,9 @@ spanOneUTF8(const UnicodeSet &set, const uint8_t *s, int32_t length) { if((int8_t)c>=0) { return set.contains(c) ? 1 : -1; } - // Take advantage of non-ASCII fastpaths in U8_NEXT(). + // Take advantage of non-ASCII fastpaths in U8_NEXT_OR_FFFD(). int32_t i=0; - U8_NEXT(s, i, length, c); + U8_NEXT_OR_FFFD(s, i, length, c); return set.contains(c) ? i : -i; } @@ -516,7 +516,7 @@ spanOneBackUTF8(const UnicodeSet &set, const uint8_t *s, int32_t length) { return set.contains(c) ? 1 : -1; } int32_t i=length-1; - c=utf8_prevCharSafeBody(s, 0, &i, c, -1); + c=utf8_prevCharSafeBody(s, 0, &i, c, -3); length-=i; return set.contains(c) ? length : -length; }