mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-28 12:23:28 +00:00
Fixed the base detection in RtlUnicodeStringToInteger again.
svn path=/trunk/; revision=17261
This commit is contained in:
@@ -876,7 +876,7 @@ RtlUnicodeStringToInteger(
|
||||
USHORT CharsRemaining = str->Length / sizeof(WCHAR);
|
||||
WCHAR wchCurrent;
|
||||
int digit;
|
||||
ULONG newbase = 10;
|
||||
ULONG newbase = 0;
|
||||
ULONG RunningTotal = 0;
|
||||
char bMinus = 0;
|
||||
|
||||
@@ -911,9 +911,11 @@ RtlUnicodeStringToInteger(
|
||||
newbase = 16;
|
||||
} /* if */
|
||||
}
|
||||
if (base == 0) {
|
||||
if (base == 0 && newbase == 0) {
|
||||
base = 10;
|
||||
} else if (base == 0 && newbase != 0) {
|
||||
base = newbase;
|
||||
} else if ((base != newbase) ||
|
||||
} else if ((newbase != 0 && base != newbase) ||
|
||||
(base != 2 && base != 8 && base != 10 && base != 16)) {
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user