1
0
forked from aniani/vim

updated for version 7.3.1165

Problem:    HP-UX compiler can't handle zero size array. (Charles Cooper)
Solution:   Make the array one item big.
This commit is contained in:
Bram Moolenaar
2013-06-11 18:42:36 +02:00
parent 9a773488a7
commit 16619a235b
3 changed files with 5 additions and 3 deletions

View File

@@ -6391,8 +6391,8 @@ nfa_regcomp(expr, re_flags)
*/
post2nfa(postfix, post_ptr, TRUE);
/* Space for compiled regexp */
prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * nstate;
/* allocate the regprog with space for the compiled regexp */
prog_size = sizeof(nfa_regprog_T) + sizeof(nfa_state_T) * (nstate - 1);
prog = (nfa_regprog_T *)lalloc(prog_size, TRUE);
if (prog == NULL)
goto fail;