Patch 8.2.1892

6 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 23, 2020, 9:41:22 AM10/23/20
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages