mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 23:24:03 +02:00
MdeModulePkg/VariablePolicyLib: Use wildcard character constant
Makes the `#` character used for comparison against wildcard characters in `CHAR16` strings to be prefixed with `L` so the character is treated as a wide character constant. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
This commit is contained in:
parent
734aaff862
commit
469f29fe76
@ -178,7 +178,7 @@ IsValidVariablePolicyStructure (
|
|||||||
WildcardCount = 0;
|
WildcardCount = 0;
|
||||||
while (*CheckChar != CHAR_NULL) {
|
while (*CheckChar != CHAR_NULL) {
|
||||||
// Make sure there aren't excessive wildcards.
|
// Make sure there aren't excessive wildcards.
|
||||||
if (*CheckChar == '#') {
|
if (*CheckChar == L'#') {
|
||||||
WildcardCount++;
|
WildcardCount++;
|
||||||
if (WildcardCount > MATCH_PRIORITY_MIN) {
|
if (WildcardCount > MATCH_PRIORITY_MIN) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -263,7 +263,7 @@ EvaluatePolicyMatch (
|
|||||||
// Keep going until the end of both strings.
|
// Keep going until the end of both strings.
|
||||||
while (PolicyName[Index] != CHAR_NULL || VariableName[Index] != CHAR_NULL) {
|
while (PolicyName[Index] != CHAR_NULL || VariableName[Index] != CHAR_NULL) {
|
||||||
// If we don't have a match...
|
// If we don't have a match...
|
||||||
if ((PolicyName[Index] != VariableName[Index]) || (PolicyName[Index] == '#')) {
|
if ((PolicyName[Index] != VariableName[Index]) || (PolicyName[Index] == L'#')) {
|
||||||
// If this is a numerical wildcard, we can consider
|
// If this is a numerical wildcard, we can consider
|
||||||
// it a match if we alter the priority.
|
// it a match if we alter the priority.
|
||||||
if ((PolicyName[Index] == L'#') &&
|
if ((PolicyName[Index] == L'#') &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user