To: vim_dev@googlegroups.com Subject: Patch 8.2.1892 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1892 Problem: Valgrind warns for using uninitialized access in tests. Solution: Fix condition for breaking out of loop. (Dominique Pellé, closes #7187) Files: src/terminal.c *** ../vim-8.2.1891/src/terminal.c 2020-09-29 21:23:17.877461823 +0200 --- src/terminal.c 2020-10-23 15:37:50.471765462 +0200 *************** *** 4718,4723 **** --- 4718,4724 ---- { 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,4733 **** } if (c != pc) same_chars = FALSE; ! if (c == NUL || pc == NUL) break; } same_attr = vtermAttr2hl(cell.attrs) --- 4728,4734 ---- } if (c != pc) same_chars = FALSE; ! if (should_break) break; } same_attr = vtermAttr2hl(cell.attrs) *** ../vim-8.2.1891/src/version.c 2020-10-22 21:22:54.744905305 +0200 --- src/version.c 2020-10-23 15:39:17.407511597 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 1892, /**/ -- hundred-and-one symptoms of being an internet addict: 118. You are on a first-name basis with your ISP's staff. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///