Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layer class LIST Expression #5245

merged 1 commit into from Feb 18, 2016

Layer class LIST Expression #5245

merged 1 commit into from Feb 18, 2016


Copy link

@tbonfort tbonfort commented Feb 18, 2016

It seems that each list item is compared to the string attribute item but it is not checked if it is the whole string.

CLASSITEM 'event'  
EXPRESSION {rain,drizzle}

This expression above returns true if "event" string attribute = "freezing rain"
A user suggested this fix
Line 490 should probably read:
if(!strncmp(start,shape->values[itemindex],end-start) && shape->values[itemindex][end-start] == '\0') return MS_TRUE;

Here are other examples where Expression returns true, but might not be the same problem/solution

String=freezing rain
EXPRESSION {rain,freezing drizzle} #doc says no space should be used though
String=freezing rain
EXPRESSION {rain,freezing,drizzle}

tbonfort added a commit to MapServer/msautotest_DEPRECATED that referenced this pull request Feb 18, 2016
@tbonfort tbonfort merged commit 0d71c41 into MapServer:branch-7-0 Feb 18, 2016
@tbonfort tbonfort deleted the issues/5245-list-expression-bug branch Feb 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant