mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
fix infinite loop in maxicode detector
This commit is contained in:
@@ -430,7 +430,14 @@ fn find_concentric_circles(image: &BitMatrix) -> Option<Vec<Circle>> {
|
|||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
// false alarm, go on with the row
|
// false alarm, go on with the row
|
||||||
current_column = center - radius + (radius / 4);
|
let new_column = center - radius + (radius / 4);
|
||||||
|
if new_column == current_column {
|
||||||
|
// this is necessary because sometimes the loop can get
|
||||||
|
// stuck when the result always comes out the same.
|
||||||
|
row += ROW_SCAN_SKIP;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
current_column = new_column;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user