aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-16 21:54:41 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-16 21:54:41 +0100
commit6d0fb4d9b77bad4496179b1b8dcf43e2d19b0cef (patch)
tree7b3f950042260e1a50cd41db8792231b5705543b
parent55fe3495e6f12959a8a5273dd21cfadf093d4d03 (diff)
XEP-0393: fix off-by-one error in block detector ('``ii``ii')
-rw-r--r--src/main/java/de/pixart/messenger/utils/ImStyleParser.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/ImStyleParser.java b/src/main/java/de/pixart/messenger/utils/ImStyleParser.java
index 46f8cec10..9f008d76c 100644
--- a/src/main/java/de/pixart/messenger/utils/ImStyleParser.java
+++ b/src/main/java/de/pixart/messenger/utils/ImStyleParser.java
@@ -71,7 +71,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) {