Loading...
--- xnu/xnu-792.6.56/libkern/c++/OSUnserializeXML.cpp
+++ xnu/xnu-517/libkern/c++/OSUnserializeXML.cpp
@@ -2,6 +2,8 @@
* Copyright (c) 1999-2002 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
+ *
+ * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
@@ -1411,8 +1413,9 @@
{
unsigned long long n = 0;
int base = 10;
- bool negate = false;
int c = currentChar();
+
+ if (!isDigit (c)) return 0;
if (c == '0') {
c = nextChar();
@@ -1422,16 +1425,9 @@
}
}
if (base == 10) {
- if (c == '-') {
- negate = true;
- c = nextChar();
- }
while(isDigit(c)) {
n = (n * base + c - '0');
c = nextChar();
- }
- if (negate) {
- n = (unsigned long long)((long long)n * (long long)-1);
}
} else {
while(isHexDigit(c)) {