aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Lukas <georg@op-co.de>2017-12-07 13:45:37 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-12-07 14:48:41 +0100
commitd96180f0ee713d83f453c22b1fc830287b6fb2fa (patch)
treeb241df040808a1a4b43e2a0fd66c18050dcc6535
parent328c6dea0fb730aa7b01cca91cd8adec5cae15f5 (diff)
XEP-0393: fix off-by-one error in block detector ('``ii``ii')HEADmaster
-rw-r--r--src/main/java/eu/siacs/conversations/utils/ImStyleParser.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java
index 7521b0e..c6982db 100644
--- a/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java
+++ b/src/main/java/eu/siacs/conversations/utils/ImStyleParser.java
@@ -72,7 +72,7 @@ public class ImStyleParser {
}
private static boolean isCharRepeatedTwoTimes(CharSequence text, char c, int index, int end) {
- return index + 1 <= end && text.charAt(index) == c && text.charAt(index) == c;
+ return index + 1 <= end && text.charAt(index) == c && text.charAt(index+1) == c;
}
private static boolean precededByWhiteSpace(CharSequence text, int index, int start) {