mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Minor hack to fix corner case from https://oss-fuzz.com/testcase-detail/5178194588729344
This commit is contained in:
parent
50ead4f658
commit
6bcae2e5ea
|
@ -343,7 +343,8 @@ public final class Detector {
|
||||||
int fromX = (int) from.getX();
|
int fromX = (int) from.getX();
|
||||||
int fromY = (int) from.getY();
|
int fromY = (int) from.getY();
|
||||||
int toX = (int) to.getX();
|
int toX = (int) to.getX();
|
||||||
int toY = (int) to.getY();
|
int toY = Math.min(image.getHeight() - 1, (int) to.getY());
|
||||||
|
|
||||||
boolean steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);
|
boolean steep = Math.abs(toY - fromY) > Math.abs(toX - fromX);
|
||||||
if (steep) {
|
if (steep) {
|
||||||
int temp = fromX;
|
int temp = fromX;
|
||||||
|
|
Loading…
Reference in a new issue