comparison src/userfunc.c @ 28382:f24d4826e6bf v8.2.4716

patch 8.2.4716: memory allocation failure not tested when defining a function Commit: https://github.com/vim/vim/commit/7c7e19cf50d76568e2637ad66b095044a41c6a82 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Apr 9 11:09:07 2022 +0100 patch 8.2.4716: memory allocation failure not tested when defining a function Problem: Memory allocation failure not tested when defining a function. Solution: Add a test. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/10127)
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Apr 2022 12:15:02 +0200
parents b418e073b42f
children 769599ee9f06
comparison
equal deleted inserted replaced
28381:ddc656bfc2b9 28382:f24d4826e6bf
1090 } 1090 }
1091 } 1091 }
1092 } 1092 }
1093 1093
1094 // Add the line to the function. 1094 // Add the line to the function.
1095 if (ga_grow(newlines, 1 + sourcing_lnum_off) == FAIL) 1095 if (ga_grow_id(newlines, 1 + sourcing_lnum_off, aid_get_func) == FAIL)
1096 goto theend; 1096 goto theend;
1097 1097
1098 if (heredoc_concat_len > 0) 1098 if (heredoc_concat_len > 0)
1099 { 1099 {
1100 // For a :def function "python << EOF" concatenates all the lines, 1100 // For a :def function "python << EOF" concatenates all the lines,