summaryrefslogtreecommitdiffstats
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorYegappan Lakshmanan <yegappan@yahoo.com>2023-01-27 21:03:12 +0000
committerBram Moolenaar <Bram@vim.org>2023-01-27 21:03:12 +0000
commitfadc02a2a57755fa1342b1b44c2ceab3046125fc (patch)
tree8e013a61d40bcca51deff9aa21cda2c51b96f41f /src/os_win32.c
parent8dbab1d8ceb82a0fb693a1b7fcb57a2dfb4de068 (diff)
patch 9.0.1251: checking returned value of ga_grow() is inconsistentv9.0.1251
Problem: Checking returned value of ga_grow() is inconsistent. Solution: Check for FAIL instaed of "not OK". (Yegappan Lakshmanan, closes #11897)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index e80533b017..884ef0d578 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -5725,7 +5725,7 @@ win32_build_env(dict_T *env, garray_T *gap, int is_terminal)
size_t lkey = wcslen(wkey);
size_t lval = wcslen(wval);
- if (ga_grow(gap, (int)(lkey + lval + 2)) != OK)
+ if (ga_grow(gap, (int)(lkey + lval + 2)) == FAIL)
continue;
for (n = 0; n < lkey; n++)
*((WCHAR*)gap->ga_data + gap->ga_len++) = wkey[n];