Remove 2 identicals calls to strlenW.
This commit is contained in:
parent
6aefbc0934
commit
407409f27f
|
@ -358,11 +358,12 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
|
||||||
value = deformat_index(record,key,&chunk);
|
value = deformat_index(record,key,&chunk);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
chunk = (strlenW(key) + 2)*sizeof(WCHAR);
|
DWORD keylen = strlenW(key);
|
||||||
|
chunk = (keylen + 2)*sizeof(WCHAR);
|
||||||
value = HeapAlloc(GetProcessHeap(),0,chunk);
|
value = HeapAlloc(GetProcessHeap(),0,chunk);
|
||||||
value[0] = '[';
|
value[0] = '[';
|
||||||
memcpy(&value[1],key,strlenW(key)*sizeof(WCHAR));
|
memcpy(&value[1],key,keylen*sizeof(WCHAR));
|
||||||
value[strlenW(key)+1] = ']';
|
value[1+keylen] = ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue