mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.2171: valgrind warning for using uninitialized value
Problem: Valgrind warning for using uninitialized value.
Solution: Do not use "startp" or "endp" unless there is a match.
61e07b2394
This commit is contained in:
parent
06869a6940
commit
afe7c43025
@ -6601,7 +6601,7 @@ theend:
|
|||||||
|| (end->lnum == start->lnum && end->col < start->col)) {
|
|| (end->lnum == start->lnum && end->col < start->col)) {
|
||||||
rex.reg_mmatch->endpos[0] = rex.reg_mmatch->startpos[0];
|
rex.reg_mmatch->endpos[0] = rex.reg_mmatch->startpos[0];
|
||||||
}
|
}
|
||||||
} else {
|
} else if (retval > 0) {
|
||||||
if (rex.reg_match->endp[0] < rex.reg_match->startp[0]) {
|
if (rex.reg_match->endp[0] < rex.reg_match->startp[0]) {
|
||||||
rex.reg_match->endp[0] = rex.reg_match->startp[0];
|
rex.reg_match->endp[0] = rex.reg_match->startp[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user