[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kjs
From:       Luciano Montanaro <mikelima () cirulla ! net>
Date:       2005-08-30 8:33:52
Message-ID: 1125390832.742913.23487.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 454902 by montanaro:

Committed fix for bug #110995 (non-pcre regular expressions do not work)


 M  +8 -3      regexp.cpp  


--- branches/KDE/3.5/kdelibs/kjs/regexp.cpp #454901:454902
@@ -114,10 +114,15 @@
   //    ;
   // Note: the Global flag is already handled by RegExpProtoFunc::execute
 
-  if (regcomp(&preg, intern.ascii(), regflags) == 0)
-    regcomp(&preg, "", regflags);
-  else
+  int errorCode = regcomp(&preg, intern.ascii(), regflags);
+  if (regcomp(&preg, intern.ascii(), regflags) != 0) {
+#ifndef NDEBUG
+    char errorMessage[80];
+    regerror(errorCode, &preg, errorMessage, sizeof errorMessage);
+    fprintf(stderr, "KJS: regcomp failed with '%s'", errorMessage);
+#endif
     valid = false;
+  }
 #endif
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic