summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/nrex/regex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nrex/regex.cpp b/drivers/nrex/regex.cpp
index 708e68cc26..0a813c3490 100644
--- a/drivers/nrex/regex.cpp
+++ b/drivers/nrex/regex.cpp
@@ -82,9 +82,9 @@ Error RegEx::compile(const String& p_pattern) {
int RegEx::find(const String& p_text, int p_start, int p_end) const {
- ERR_FAIL_COND_V( !exp.valid(), false );
- ERR_FAIL_COND_V( p_text.length() < p_start, false );
- ERR_FAIL_COND_V( p_text.length() < p_end, false );
+ ERR_FAIL_COND_V( !exp.valid(), -1 );
+ ERR_FAIL_COND_V( p_text.length() < p_start, -1 );
+ ERR_FAIL_COND_V( p_text.length() < p_end, -1 );
bool res = exp.match(p_text.c_str(), &captures[0], p_start, p_end);