0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1251: checking returned value of ga_grow() is inconsistent

Problem:    Checking returned value of ga_grow() is inconsistent.
Solution:   Check for FAIL instaed of "not OK". (Yegappan Lakshmanan,
            closes #11897)
This commit is contained in:
Yegappan Lakshmanan
2023-01-27 21:03:12 +00:00
committed by Bram Moolenaar
parent 8dbab1d8ce
commit fadc02a2a5
12 changed files with 16 additions and 14 deletions

View File

@@ -1682,7 +1682,7 @@ registerdigraph(int char1, int char2, int n)
}
// Add a new digraph to the table.
if (ga_grow(&user_digraphs, 1) != OK)
if (ga_grow(&user_digraphs, 1) == FAIL)
return;
dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len;