diff options
author | Will Estes <wlestes@users.sourceforge.net> | 2007-03-07 21:50:24 +0000 |
---|---|---|
committer | Will Estes <wlestes@users.sourceforge.net> | 2007-03-07 21:50:24 +0000 |
commit | 2658075a3483f4cb7256b520a1405756302d7bf1 (patch) | |
tree | 8e3c401463bbc9c73699c5b2b039999d044538b8 /flex.skl | |
parent | 158a4ad508a43b8e55e7b828a63452f3704dd03f (diff) |
apply patches submitted by sodabrew
Diffstat (limited to 'flex.skl')
-rw-r--r-- | flex.skl | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1647,6 +1647,13 @@ m4_ifdef( [[M4_YY_USES_REJECT]], else ret_val = EOB_ACT_CONTINUE_SCAN; + if ((yy_size_t) (yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yy_n_chars + number_to_move + (yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size); + } + YY_G(yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[YY_G(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; |