Issue 1427 fix small off by one in RSS expanded decoder

git-svn-id: https://zxing.googlecode.com/svn/trunk@2500 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-11-07 14:43:35 +00:00
parent 2581409353
commit 786aae487e
3 changed files with 3 additions and 2 deletions

View file

@ -83,6 +83,7 @@ Sanford Squires
Shachar Shemesh
Sean Owen (Google)
Shiyuan Guo / 郭世元
ShumovichY
Simon Flannery (Ericsson)
Steven Parkes
Suraj Supekar

View file

@ -404,7 +404,7 @@ public final class RSSExpandedReader extends AbstractRSSReader {
if (leftChar) {
recordPatternInReverse(row, pattern.getStartEnd()[0], counters);
} else {
recordPattern(row, pattern.getStartEnd()[1] + 1, counters);
recordPattern(row, pattern.getStartEnd()[1], counters);
// reverse it
for (int i = 0, j = counters.length - 1; i < j; i++, j--) {
int temp = counters[i];

View file

@ -35,6 +35,6 @@ public final class RSSExpandedBlackBox2TestCase extends AbstractBlackBoxTestCase
public RSSExpandedBlackBox2TestCase() {
super("test/data/blackbox/rssexpanded-2", new MultiFormatReader(), BarcodeFormat.RSS_EXPANDED);
addTest(21, 23, 0.0f);
addTest(19, 23, 180.0f);
addTest(21, 23, 180.0f);
}
}