[ros-diffs] [hbirr] 17261: Fixed the base detection in
RtlUnicodeStringToInteger again.
hbirr at svn.reactos.com
hbirr at svn.reactos.com
Wed Aug 10 19:50:15 CEST 2005
Fixed the base detection in RtlUnicodeStringToInteger again.
Modified: trunk/reactos/lib/rtl/unicode.c
_____
Modified: trunk/reactos/lib/rtl/unicode.c
--- 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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050810/794df7a7/attachment.html
More information about the Ros-diffs
mailing list