Skip to content

Commit 4664371

Browse files
committed
patch 7.4.2357
Problem: Attempt to read history entry while not initialized. Solution: Skip when the index is negative.
1 parent ea683da commit 4664371

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ex_getln.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5762,7 +5762,7 @@ add_to_history(
57625762
*/
57635763
if (histype == HIST_SEARCH && in_map)
57645764
{
5765-
if (maptick == last_maptick)
5765+
if (maptick == last_maptick && hisidx[HIST_SEARCH] >= 0)
57665766
{
57675767
/* Current line is from the same mapping, remove it */
57685768
hisptr = &history[HIST_SEARCH][hisidx[HIST_SEARCH]];

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,8 @@ static char *(features[]) =
763763

764764
static int included_patches[] =
765765
{ /* Add new patch number below this line */
766+
/**/
767+
2357,
766768
/**/
767769
2356,
768770
/**/

0 commit comments

Comments
 (0)