Browse Source

correct fix for pcre js compat

Nicolas Cannasse 7 years ago
parent
commit
0faaa1394d
2 changed files with 1 additions and 2 deletions
  1. 0 1
      include/pcre/config.h
  2. 1 1
      src/std/regexp.c

+ 0 - 1
include/pcre/config.h

@@ -1,7 +1,6 @@
 #define COMPILE_PCRE16
 #undef SUPPORT_JIT
 #define PCRE_STATIC
-#define PCRE_JAVASCRIPT_COMPAT
 
 #ifdef _MSC_VER
 #	pragma warning(disable:4710) // inline disabled

+ 1 - 1
src/std/regexp.c

@@ -47,7 +47,7 @@ HL_PRIM ereg *hl_regexp_new_options( vbyte *str, vbyte *opts ) {
 	int errorcode;
 	pcre16 *p;
 	uchar *o = (uchar*)opts;
-	int options = 0;
+	int options = PCRE_JAVASCRIPT_COMPAT;
 	while( *o ) {
 		switch( *o++ ) {
 		case 'i':