blob: 7d36afbe062c327fed350d2e90b6396afe0c5250 [file] [log] [blame]
From 08df6fc4d5a3f8cbecf810a3a413e3b44bc8364a Mon Sep 17 00:00:00 2001
From: Holger Bruch <holger.bruch@systect.de>
Date: Sun, 7 Jan 2018 16:25:38 +0100
Subject: [PATCH] Fix hyphenation for indicators >6
---
.../apache/lucene/analysis/compound/hyphenation/HyphenationTree.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
index 0f7dd2b..3c72b4f 100644
--- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
+++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/compound/hyphenation/HyphenationTree.java
@@ -89,7 +89,7 @@ public class HyphenationTree extends TernaryTree implements PatternConsumer {
StringBuilder buf = new StringBuilder();
byte v = vspace.get(k++);
while (v != 0) {
- char c = (char) ((v >>> 4) - 1 + '0');
+ char c = (char) (((v & 0xf0 )>>> 4) - 1 + '0');
buf.append(c);
c = (char) (v & 0x0f);
if (c == 0) {
@@ -151,7 +151,7 @@ public class HyphenationTree extends TernaryTree implements PatternConsumer {
StringBuilder buf = new StringBuilder();
byte v = vspace.get(k++);
while (v != 0) {
- char c = (char) ((v >>> 4) - 1);
+ char c = (char) (((v & 0xf0 )>>> 4) - 1);
buf.append(c);
c = (char) (v & 0x0f);
if (c == 0) {
--
2.7.0.windows.1