From 21ae30b985f84bb5fdcd2126668b0cd46714db3e Mon Sep 17 00:00:00 2001 From: 9iky6 Date: Fri, 7 Nov 2014 18:09:10 +0500 Subject: [PATCH] Fix stock regex_match_simple Fix regex_match_simple. Where regex_match_ex referred to in this file? --- plugins/include/regex.inc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/include/regex.inc b/plugins/include/regex.inc index 596e9111..fe0f4005 100755 --- a/plugins/include/regex.inc +++ b/plugins/include/regex.inc @@ -305,16 +305,12 @@ native Regex:regex_match_all(const string[], const pattern[], flags = 0, error[] stock regex_match_simple(const str[], const pattern[], flags = 0, error[]= "", maxLen = 0, &errcode = 0) { new Regex:regex = regex_compile_ex(pattern, flags, error, maxLen, errcode); - - if (regex < 0) + if (regex < REGEX_NO_MATCH) { return -1; } - - new substrings = regex_match_c(regex, str); - + new substrings = regex_match_c(str, regex); regex_free(regex); - return substrings; }