comparison src/popupwin.c @ 17332:61f0bf94ef92 v8.1.1665

patch 8.1.1665: crash when popup window with mask is below the screen commit https://github.com/vim/vim/commit/b4207474780569bcc9840e03f13edb5d9c2554f5 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jul 12 16:05:45 2019 +0200 patch 8.1.1665: crash when popup window with mask is below the screen Problem: Crash when popup window with mask is below the screen. Solution: Correct boundary check.
author Bram Moolenaar <Bram@vim.org>
date Fri, 12 Jul 2019 16:15:04 +0200
parents 12c1f01b304e
children 1ac1d34bbdbf
comparison
equal deleted inserted replaced
17331:c3dcc589da00 17332:61f0bf94ef92
2321 cols = 0; 2321 cols = 0;
2322 cole -= wp->w_popup_leftoff; 2322 cole -= wp->w_popup_leftoff;
2323 --lines; 2323 --lines;
2324 if (lines < 0) 2324 if (lines < 0)
2325 lines = 0; 2325 lines = 0;
2326 for (line = lines; line < linee && line < screen_Rows; ++line) 2326 for (line = lines; line < linee
2327 for (col = cols; col < cole && col < screen_Columns; ++col) 2327 && line + wp->w_winrow < screen_Rows; ++line)
2328 for (col = cols; col < cole
2329 && col + wp->w_wincol < screen_Columns; ++col)
2328 popup_transparent[(line + wp->w_winrow) * screen_Columns 2330 popup_transparent[(line + wp->w_winrow) * screen_Columns
2329 + col + wp->w_wincol] = val; 2331 + col + wp->w_wincol] = val;
2330 } 2332 }
2331 } 2333 }
2332 } 2334 }