# HG changeset patch # User Bram Moolenaar # Date 1603460704 -7200 # Node ID 73688eec32cae74bbc8dfe37e44d5da0a58b9daf # Parent 93175349451011dbae9a7389537957f102dac79f patch 8.2.1892: valgrind warns for using uninitialized access in tests Commit: https://github.com/vim/vim/commit/9c24cd11e2048e16e25271a7a7dbef4593890a18 Author: Bram Moolenaar Date: Fri Oct 23 15:40:39 2020 +0200 patch 8.2.1892: valgrind warns for using uninitialized access in tests Problem: Valgrind warns for using uninitialized access in tests. Solution: Fix condition for breaking out of loop. (Dominique Pell?, closes #7187) diff --git a/src/terminal.c b/src/terminal.c --- a/src/terminal.c +++ b/src/terminal.c @@ -4718,6 +4718,7 @@ f_term_dumpwrite(typval_T *argvars, typv { int c = cell.chars[i]; int pc = prev_cell.chars[i]; + int should_break = c == NUL || pc == NUL; // For the first character NUL is the same as space. if (i == 0) @@ -4727,7 +4728,7 @@ f_term_dumpwrite(typval_T *argvars, typv } if (c != pc) same_chars = FALSE; - if (c == NUL || pc == NUL) + if (should_break) break; } same_attr = vtermAttr2hl(cell.attrs) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1892, +/**/ 1891, /**/ 1890,