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/).
This commit is contained in:
parent
c8b1861b8f
commit
8d0eb68255
1 changed files with 1 additions and 1 deletions
|
@ -1011,7 +1011,7 @@ static void test_neighbours(struct quirc *q, int i,
|
|||
}
|
||||
}
|
||||
|
||||
if (best_h < 0)
|
||||
if (best_h < 0 || best_v < 0)
|
||||
return;
|
||||
|
||||
record_qr_grid(q, best_h, i, best_v);
|
||||
|
|
Loading…
Reference in a new issue