From: Michael Ow Date: Fri, 8 Jul 2011 17:22:34 +0000 (+0000) Subject: ICU-8660 Skip the current source char when searching for the next escape character X-Git-Tag: milestone-59-0-1~4669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=834901f20c61c29ee7b4c3cee0015247abb3b649;p=icu ICU-8660 Skip the current source char when searching for the next escape character X-SVN-Rev: 30297 --- diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetCompoundText.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetCompoundText.java index 8e62234e12a..d0647915160 100644 --- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetCompoundText.java +++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetCompoundText.java @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 2010, International Business Machines Corporation and * + * Copyright (C) 2010-2011, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ @@ -200,12 +200,12 @@ class CharsetCompoundText extends CharsetICU { private static int findNextEsc(ByteBuffer source) { int sourceLimit = source.limit(); - for (int i = source.position(); i < sourceLimit; i++) { + for (int i = (source.position() + 1); i < sourceLimit; i++) { if (source.get(i) == 0x1B) { return i; } } - return source.limit(); + return sourceLimit; } private static byte getState(int codepoint) {