]> err.no Git - sope/blobdiff - sope-core/EOControl/EOQualifierParser.m
fixed a few warnings when compiling against GNUstep
[sope] / sope-core / EOControl / EOQualifierParser.m
index 5f2286709701dd3bf3b63536fc60ac547b4ddd6e..1f803442961d8c6a28c0f67381eebddf502b294a 100644 (file)
@@ -1,5 +1,6 @@
 /*
-  Copyright (C) 2000-2005 SKYRIX Software AG
+  Copyright (C) 2000-2007 SKYRIX Software AG
+  Copyright (C) 2007      Helge Hess
 
   This file is part of SOPE.
 
@@ -956,9 +957,17 @@ static id _parseValue(id _ctx, const char *_buf, unsigned _bufLen,
        if (rc != 0)
          /* does not match */
          continue;
-       if (!(_buf[pos + toklen] == '\0' || isspace(_buf[pos + toklen])))
-         /* not at the string end or folloed by a space */
+       
+       if (!(_buf[pos + toklen] == '\0' || isspace(_buf[pos + toklen]) ||
+             _buf[pos + toklen] == ')')) {
+         /*
+           Not at the string end or followed by a space or a right 
+           parenthesis. The latter is required to correctly parse this:
+             (not (attribute = nil) and
+               attribute.className = 'com.webobjects.foundation.NSTimestamp')
+         */
          continue;
+       }
 
        /* wow, found the token */
        pos += toklen; /* skip it */