diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-13 00:59:35 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-13 00:59:35 +0100 |
commit | 7d0d706260200277199791a79546cea3c6dc1657 (patch) | |
tree | 875c00ca48bf470131bd6252bc5d21721accb05f /parser.cpp | |
parent | 08121e466c07d72345e50c501762adc36f566d9a (diff) | |
download | sciteco-7d0d706260200277199791a79546cea3c6dc1657.tar.gz |
when doing a reverse search, allocate array of matches (since it can currently get very large)
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1028,7 +1028,7 @@ StateSearch::process(const gchar *str, gint new_chars __attribute__((unused))) gint from, to; }; /* at most one match per character */ - Range matched[parameters.to - parameters.from]; + Range *matched = new Range[parameters.to - parameters.from]; gint i = 0; while (g_match_info_matches(info)) { @@ -1045,6 +1045,8 @@ StateSearch::process(const gchar *str, gint new_chars __attribute__((unused))) matched_from = matched[i + parameters.count].from; matched_to = matched[i + parameters.count].to; } + + delete matched; } g_match_info_free(info); |