mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
- Fixed the hex conversion in RtlUnicodeStringToInteger.
svn path=/trunk/; revision=7499
This commit is contained in:
parent
446ec6d27b
commit
c7d94ffc7c
1 changed files with 6 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: unicode.c,v 1.30 2003/07/11 13:50:23 royce Exp $
|
/* $Id: unicode.c,v 1.31 2004/01/07 10:11:03 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -1335,14 +1335,13 @@ RtlUnicodeStringToInteger(
|
||||||
{
|
{
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
else if ((((*Str > L'9') || (*Str < L'0')) ||
|
else if ( ((*Str > L'9') || (*Str < L'0')) &&
|
||||||
((towupper (*Str) > L'F') ||
|
((towupper (*Str) > L'F') || (towupper (*Str) < L'A')) &&
|
||||||
(towupper (*Str) < L'A'))) && (Base == 16))
|
(Base == 16))
|
||||||
{
|
{
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
else
|
Str++;
|
||||||
Str++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Str = String->Buffer + lenmin;
|
Str = String->Buffer + lenmin;
|
||||||
|
@ -1352,7 +1351,7 @@ RtlUnicodeStringToInteger(
|
||||||
|
|
||||||
while (iswxdigit (*Str) &&
|
while (iswxdigit (*Str) &&
|
||||||
(Val = iswdigit (*Str) ? *Str - L'0' : (iswlower (*Str)
|
(Val = iswdigit (*Str) ? *Str - L'0' : (iswlower (*Str)
|
||||||
? toupper (*Str) : *Str) - L'A' + 10) < Base)
|
? towupper (*Str) : *Str) - L'A' + 10) < Base)
|
||||||
{
|
{
|
||||||
*Value = *Value * Base + Val;
|
*Value = *Value * Base + Val;
|
||||||
Str++;
|
Str++;
|
||||||
|
|
Loading…
Reference in a new issue