Patch 9.0.0501

3 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 19, 2022, 6:44:52 AM9/19/22
to vim...@googlegroups.com

Patch 9.0.0501
Problem: Warning for using uninitialized value in mouse test.
Solution: Clear ScreenCols when allocating it. (Dominique Pellé)
Files: src/screen.c


*** ../vim-9.0.0500/src/screen.c 2022-09-11 21:35:47.558255161 +0100
--- src/screen.c 2022-09-19 11:41:48.675196800 +0100
***************
*** 2708,2714 ****
if (enc_dbcs == DBCS_JPNU)
new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns);
! new_ScreenCols = LALLOC_MULT(colnr_T, (Rows + 1) * Columns);
new_LineOffset = LALLOC_MULT(unsigned, Rows);
new_LineWraps = LALLOC_MULT(char_u, Rows);
new_TabPageIdxs = LALLOC_MULT(short, Columns);
--- 2708,2716 ----
if (enc_dbcs == DBCS_JPNU)
new_ScreenLines2 = LALLOC_MULT(schar_T, (Rows + 1) * Columns);
new_ScreenAttrs = LALLOC_MULT(sattr_T, (Rows + 1) * Columns);
! // Clear ScreenCols to avoid a warning for unitialized memory in
! // jump_to_mouse().
! new_ScreenCols = LALLOC_CLEAR_MULT(colnr_T, (Rows + 1) * Columns);
new_LineOffset = LALLOC_MULT(unsigned, Rows);
new_LineWraps = LALLOC_MULT(char_u, Rows);
new_TabPageIdxs = LALLOC_MULT(short, Columns);
*** ../vim-9.0.0500/src/version.c 2022-09-18 15:03:18.351501363 +0100
--- src/version.c 2022-09-19 11:12:51.054185520 +0100
***************
*** 701,702 ****
--- 701,704 ----
{ /* Add new patch number below this line */
+ /**/
+ 501,
/**/

--
I AM THANKFUL...
...for the piles of laundry and ironing because it means I
have plenty of clothes to wear.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages