Problem: HP-UX compiler can't handle zero size array. (Charles Cooper)
Solution: Make the array one item big.
#endif
int nsubexp; /* number of () */
int nstate;
- nfa_state_T state[0]; /* actually longer.. */
+ nfa_state_T state[1]; /* actually longer.. */
} nfa_regprog_T;
/*
*/
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;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1165,
/**/
1164,
/**/