mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:35:43 +00:00
- Fix a bug that caused translations of NdisParameterInteger values into unicode strings to produce bad results
- Fix a bug that caused NdisParameterMultiString values to be written to the registry incorrectly svn path=/trunk/; revision=41522
This commit is contained in:
parent
12b34a994b
commit
55b816a7c4
1 changed files with 4 additions and 4 deletions
|
@ -63,7 +63,7 @@ NdisWriteConfiguration(
|
|||
* I don't know why tho so i free everything before return. comments welcome.
|
||||
*/
|
||||
{
|
||||
ULONG ParameterType = ParameterValue->ParameterType;
|
||||
ULONG ParameterType;
|
||||
ULONG DataSize;
|
||||
PVOID Data;
|
||||
WCHAR Buff[25];
|
||||
|
@ -71,7 +71,7 @@ NdisWriteConfiguration(
|
|||
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
|
||||
|
||||
/* reset parameter type to standard reg types */
|
||||
switch(ParameterType)
|
||||
switch(ParameterValue->ParameterType)
|
||||
{
|
||||
case NdisParameterHexInteger:
|
||||
case NdisParameterInteger:
|
||||
|
@ -85,7 +85,7 @@ NdisWriteConfiguration(
|
|||
ParameterType = REG_SZ;
|
||||
if (!NT_SUCCESS(RtlIntegerToUnicodeString(
|
||||
ParameterValue->ParameterData.IntegerData,
|
||||
(ParameterType == NdisParameterInteger) ? 10 : 16, &Str)))
|
||||
(ParameterValue->ParameterType == NdisParameterInteger) ? 10 : 16, &Str)))
|
||||
{
|
||||
*Status = NDIS_STATUS_FAILURE;
|
||||
return;
|
||||
|
@ -96,7 +96,7 @@ NdisWriteConfiguration(
|
|||
break;
|
||||
case NdisParameterString:
|
||||
case NdisParameterMultiString:
|
||||
ParameterType = REG_SZ;
|
||||
ParameterType = (ParameterValue->ParameterType == NdisParameterString) ? REG_SZ : REG_MULTI_SZ;
|
||||
Data = ParameterValue->ParameterData.StringData.Buffer;
|
||||
DataSize = ParameterValue->ParameterData.StringData.Length;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue