Mercurial > vim
comparison src/digraph.c @ 31837:e16361210675 v9.0.1251
patch 9.0.1251: checking returned value of ga_grow() is inconsistent
Commit: https://github.com/vim/vim/commit/fadc02a2a57755fa1342b1b44c2ceab3046125fc
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Fri Jan 27 21:03:12 2023 +0000
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 27 Jan 2023 22:15:03 +0100 |
parents | 50555279168b |
children | 74a0f1bc62b1 |
comparison
equal
deleted
inserted
replaced
31836:f800c5e0c695 | 31837:e16361210675 |
---|---|
1680 } | 1680 } |
1681 ++dp; | 1681 ++dp; |
1682 } | 1682 } |
1683 | 1683 |
1684 // Add a new digraph to the table. | 1684 // Add a new digraph to the table. |
1685 if (ga_grow(&user_digraphs, 1) != OK) | 1685 if (ga_grow(&user_digraphs, 1) == FAIL) |
1686 return; | 1686 return; |
1687 | 1687 |
1688 dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len; | 1688 dp = (digr_T *)user_digraphs.ga_data + user_digraphs.ga_len; |
1689 dp->char1 = char1; | 1689 dp->char1 = char1; |
1690 dp->char2 = char2; | 1690 dp->char2 = char2; |