[OGo-Developer] Bug in EOQualifierParser.m

Stéphane Corthésy developer@opengroupware.org
Sat, 13 Jan 2007 20:01:20 +0100


Hi,

I found a bug in latest sope-core/EOControl/EOQualifierParser.m, line  
960:

	if (!(_buf[pos + toklen] == '\0' || isspace(_buf[pos + toklen])))
	  /* not at the string end or folloed by a space */
	  continue;

The following qualifier string, which is valid, is not parsed  
correctly: the 'nil' token is wrongly interpreted as a string:

(not (attribute = nil) and attribute.className =  
'com.webobjects.foundation.NSTimestamp')


The fix is easy, I guess: simply check for the right parenthesis too:

	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 */
	  continue;

Stéphane