diff options
author | Zher Huei Lee <lee.zh.92@gmail.com> | 2015-10-20 09:48:09 +0100 |
---|---|---|
committer | Zher Huei Lee <lee.zh.92@gmail.com> | 2015-11-07 11:03:24 +0000 |
commit | 26b977c96795172b1e095c06222eb30cfc6f4cb7 (patch) | |
tree | 8a541d69f7f7aa7021416e057703905492437737 /drivers/nrex/regex.cpp | |
parent | 6d54f82ab4afe760743842f1eaba3cb4befec5c8 (diff) |
Fixed segfault in RegEx.get_capture()
Diffstat (limited to 'drivers/nrex/regex.cpp')
-rw-r--r-- | drivers/nrex/regex.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nrex/regex.cpp b/drivers/nrex/regex.cpp index 0a813c3490..2707249a6e 100644 --- a/drivers/nrex/regex.cpp +++ b/drivers/nrex/regex.cpp @@ -54,7 +54,9 @@ bool RegEx::is_valid() const { }; int RegEx::get_capture_count() const { - + + ERR_FAIL_COND_V( !exp.valid(), 0 ); + return exp.capture_size(); } |