Remove leading and trialing quotes from config values
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 26s
Builds / ExectOS (i686) (push) Successful in 26s

This commit is contained in:
Rafal Kupiec 2023-12-18 18:49:49 +01:00
parent c2d40e3011
commit fbcf952dad
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -451,6 +451,18 @@ BlpParseConfigFile(IN CONST PCHAR RawConfig,
return Status;
}
/* Remove leading quotes from the value */
if(*Value == '"' || *Value == '\'')
{
Value++;
}
/* Remove trailing quotes from the value */
if(Value[ValueLength - 2] == '"' || Value[ValueLength - 2] == '\'')
{
Value[ValueLength - 2] = 0;
}
/* Initialize new option and add it to the list */
RtlStringToWideString(Option->Name, &Key, RtlStringLength(Key, 0) + 1);
RtlStringToWideString(Option->Value, &Value, RtlStringLength(Value, 0) + 1);