Commit 0f787088 authored by Hongbo Zhao's avatar Hongbo Zhao Committed by Keith Packard

Not_contain should use strstr, not strcmp on strings. (bug 13632)

For Version 2.5.0, (same for previous version 2.4.2), in source file fccfg.c,
on line 700,

Original:
      ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) == 0;

Should change to:
      ret = FcStrStrIgnoreCase (left.u.s, right.u.s) == 0;

I think this is just a mistake when copy-n-paste similar codes in the same
function. Apparently, return for "Not_contain" should be just the inverse of
"Contain", not the same as "Equal".
parent 6e5d2cb9
......@@ -697,7 +697,7 @@ FcConfigCompareValue (const FcValue *left_o,
ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) != 0;
break;
case FcOpNotContains:
ret = FcStrCmpIgnoreCase (left.u.s, right.u.s) == 0;
ret = FcStrStrIgnoreCase (left.u.s, right.u.s) == 0;
break;
default:
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment