Skip to content

Commit 8d0eb68

Browse files
committed
test_neighbours: fix warnings in static analyzer.
Coverity complains that a negative value of best_v might be passed to record_qr_grid(). Fix supplied by Harald Eilertsen (http://github.com/snake66/).
1 parent c8b1861 commit 8d0eb68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/identify.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ static void test_neighbours(struct quirc *q, int i,
10111011
}
10121012
}
10131013

1014-
if (best_h < 0)
1014+
if (best_h < 0 || best_v < 0)
10151015
return;
10161016

10171017
record_qr_grid(q, best_h, i, best_v);

0 commit comments

Comments
 (0)