Mercurial > hg > octave-jordi
changeset 15819:1e9a6285acc4
Fix segfault with clear -regexp (bug #37924)
* liboctave/util/regexp.cc(ismatch): Check size of match list (> 0)
to determine if there was a match. Don't index into non-existent
match element.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 19 Dec 2012 09:36:08 -0800 |
parents | 142de7308ebf |
children | 00172e5c2302 |
files | liboctave/util/regexp.cc |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/regexp.cc +++ b/liboctave/util/regexp.cc @@ -426,11 +426,7 @@ { regexp::match_data rx_lst = match (buffer); - regexp::match_data::const_iterator p = rx_lst.begin (); - - std::string match_string = p->match_string (); - - return ! match_string.empty (); + return rx_lst.size () > 0; } Array<bool>