Changeset 5781 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Nov 16, 2007 6:55:05 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strtonum.cpp
r5712 r5781 39 39 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 40 40 }; 41 /** Approximated overflow shift checks. 42 * @todo make the overflow stuff work for real. */ 41 /** Approximated overflow shift checks. */ 43 42 static const char g_auchShift[36] = 44 43 { 45 44 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 */ 46 64, 64, 63, 63, 62, 62, 6 1, 61, 60, 60, 59, 59, 58, 58, 57, 57, 56, 56, 55, 55, 54, 54, 53, 53, 52, 52, 51, 51, 50, 50, 49, 49, 50, 50, 51, 5145 64, 64, 63, 63, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59 47 46 }; 48 47 … … 573 572 * Note: We only support ascii digits at this time... :-) 574 573 */ 575 //int iShift = g_auchShift[uBase];574 int iShift = g_auchShift[uBase]; /** @todo test this, it's probably not 100% right yet. */ 576 575 pszValue = psz; /* (Prefix and sign doesn't count in the digit counting.) */ 577 576 int rc = VINF_SUCCESS; … … 587 586 i64 *= uBase; 588 587 i64 += chDigit; 589 if (i64Prev > i64 /* || (i64Prev >> iShift)*/)588 if (i64Prev > i64 || (i64Prev >> iShift)) 590 589 rc = VWRN_NUMBER_TOO_BIG; 591 590 psz++;
Note:
See TracChangeset
for help on using the changeset viewer.