Mercurial > hg > octave-lyh
diff liboctave/util/regexp.cc @ 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 | 9db32cabeacf |
children |
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>