mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +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.
|
* I don't know why tho so i free everything before return. comments welcome.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
ULONG ParameterType = ParameterValue->ParameterType;
|
ULONG ParameterType;
|
||||||
ULONG DataSize;
|
ULONG DataSize;
|
||||||
PVOID Data;
|
PVOID Data;
|
||||||
WCHAR Buff[25];
|
WCHAR Buff[25];
|
||||||
|
@ -71,7 +71,7 @@ NdisWriteConfiguration(
|
||||||
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
|
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
|
||||||
|
|
||||||
/* reset parameter type to standard reg types */
|
/* reset parameter type to standard reg types */
|
||||||
switch(ParameterType)
|
switch(ParameterValue->ParameterType)
|
||||||
{
|
{
|
||||||
case NdisParameterHexInteger:
|
case NdisParameterHexInteger:
|
||||||
case NdisParameterInteger:
|
case NdisParameterInteger:
|
||||||
|
@ -85,7 +85,7 @@ NdisWriteConfiguration(
|
||||||
ParameterType = REG_SZ;
|
ParameterType = REG_SZ;
|
||||||
if (!NT_SUCCESS(RtlIntegerToUnicodeString(
|
if (!NT_SUCCESS(RtlIntegerToUnicodeString(
|
||||||
ParameterValue->ParameterData.IntegerData,
|
ParameterValue->ParameterData.IntegerData,
|
||||||
(ParameterType == NdisParameterInteger) ? 10 : 16, &Str)))
|
(ParameterValue->ParameterType == NdisParameterInteger) ? 10 : 16, &Str)))
|
||||||
{
|
{
|
||||||
*Status = NDIS_STATUS_FAILURE;
|
*Status = NDIS_STATUS_FAILURE;
|
||||||
return;
|
return;
|
||||||
|
@ -96,7 +96,7 @@ NdisWriteConfiguration(
|
||||||
break;
|
break;
|
||||||
case NdisParameterString:
|
case NdisParameterString:
|
||||||
case NdisParameterMultiString:
|
case NdisParameterMultiString:
|
||||||
ParameterType = REG_SZ;
|
ParameterType = (ParameterValue->ParameterType == NdisParameterString) ? REG_SZ : REG_MULTI_SZ;
|
||||||
Data = ParameterValue->ParameterData.StringData.Buffer;
|
Data = ParameterValue->ParameterData.StringData.Buffer;
|
||||||
DataSize = ParameterValue->ParameterData.StringData.Length;
|
DataSize = ParameterValue->ParameterData.StringData.Length;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue