Changeset 42072 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Jul 10, 2012 7:39:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/strtonum.cpp
r40938 r42072 972 972 RTDECL(int) RTStrConvertHexBytes(char const *pszHex, void *pv, size_t cb, uint32_t fFlags) 973 973 { 974 size_t cbDst; 975 uint8_t *pbDst; 976 const char *pszSrc; 977 974 978 AssertPtrReturn(pszHex, VERR_INVALID_POINTER); 975 979 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 976 980 977 size_t cbDst= cb;978 uint8_t *pbDst= (uint8_t *)pv;979 const char *pszSrc= pszHex;981 cbDst = cb; 982 pbDst = (uint8_t *)pv; 983 pszSrc = pszHex; 980 984 for (;;) 981 985 { … … 983 987 char ch = *pszSrc++; 984 988 unsigned char uchDigit1 = g_auchDigits[(unsigned char)ch]; 989 unsigned char uchDigit2; 985 990 if (uchDigit1 >= 16) 986 991 { … … 994 999 995 1000 ch = *pszSrc++; 996 u nsigned char uchDigit2 = g_auchDigits[(unsigned char)ch];1001 uchDigit2 = g_auchDigits[(unsigned char)ch]; 997 1002 if (uchDigit2 >= 16) 998 1003 return VERR_UNEVEN_INPUT;
Note:
See TracChangeset
for help on using the changeset viewer.