Commit 71aecea2 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix bitwise matching (courtesy of Luke Howard)

parent bcf7b470
......@@ -3545,7 +3545,7 @@ integerBitAndMatch(
if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
return LDAP_CONSTRAINT_VIOLATION;
*matchp = (lValue & lAssertedValue);
*matchp = (lValue & lAssertedValue) ? 0 : 1;
return LDAP_SUCCESS;
}
......@@ -3569,7 +3569,7 @@ integerBitOrMatch(
if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
return LDAP_CONSTRAINT_VIOLATION;
*matchp = (lValue | lAssertedValue);
*matchp = (lValue | lAssertedValue) ? 0 : -1;
return LDAP_SUCCESS;
}
......
Supports Markdown
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