From c7d94ffc7c1cc556303b027fd7d8980336ba15ef Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Wed, 7 Jan 2004 10:11:03 +0000 Subject: [PATCH] - Fixed the hex conversion in RtlUnicodeStringToInteger. svn path=/trunk/; revision=7499 --- reactos/lib/ntdll/rtl/unicode.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/reactos/lib/ntdll/rtl/unicode.c b/reactos/lib/ntdll/rtl/unicode.c index 0b21bab7674..86b996c6fcd 100644 --- a/reactos/lib/ntdll/rtl/unicode.c +++ b/reactos/lib/ntdll/rtl/unicode.c @@ -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 * PROJECT: ReactOS kernel @@ -1335,14 +1335,13 @@ RtlUnicodeStringToInteger( { return STATUS_INVALID_PARAMETER; } - else if ((((*Str > L'9') || (*Str < L'0')) || - ((towupper (*Str) > L'F') || - (towupper (*Str) < L'A'))) && (Base == 16)) + else if ( ((*Str > L'9') || (*Str < L'0')) && + ((towupper (*Str) > L'F') || (towupper (*Str) < L'A')) && + (Base == 16)) { return STATUS_INVALID_PARAMETER; } - else - Str++; + Str++; } Str = String->Buffer + lenmin; @@ -1352,7 +1351,7 @@ RtlUnicodeStringToInteger( while (iswxdigit (*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; Str++;