--- trunk/reactos/lib/rtl/unicode.c 2005-08-10 17:48:13 UTC (rev 17260)
+++ trunk/reactos/lib/rtl/unicode.c 2005-08-10 17:49:57 UTC (rev 17261)
@@ -876,7 +876,7 @@
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 @@
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;