Skip to content

Commit 7345837

Browse files
committed
src/xpath.c: coverity fix - overflowed constant
1 parent 3842eee commit 7345837

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/xpath.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8250,7 +8250,9 @@ eval_name_test_with_predicate(const struct lyxp_expr *exp, uint32_t *tok_idx, en
82508250
if (set->used) {
82518251
i = set->used;
82528252
do {
8253-
--i;
8253+
if (i > 0) {
8254+
--i;
8255+
}
82548256
if (set->val.scnodes[i].in_ctx > LYXP_SET_SCNODE_ATOM_NODE) {
82558257
found = 1;
82568258
break;

0 commit comments

Comments
 (0)