- Timestamp:
- Jul 1, 2014 8:32:22 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/base64.cpp
r51788 r51790 232 232 uint8_t u8Trio[3] = { 0, 0, 0 }; /* shuts up gcc */ 233 233 uint8_t *pbData = (uint8_t *)pvData; 234 unsigned ch; 234 235 uint8_t u8; 235 236 unsigned c6Bits = 0; … … 239 240 { 240 241 /* The first 6-bit group. */ 241 while ((u8 = cchStringMax > 0 ? g_au8CharToVal[*pszString] : BASE64_INVALID) == BASE64_SPACE)242 while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE) 242 243 pszString++, cchStringMax--; 243 244 if (u8 >= 64) … … 251 252 252 253 /* The second 6-bit group. */ 253 while ((u8 = cchStringMax > 0 ? g_au8CharToVal[*pszString] : BASE64_INVALID) == BASE64_SPACE)254 while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE) 254 255 pszString++, cchStringMax--; 255 256 if (u8 >= 64) … … 265 266 /* The third 6-bit group. */ 266 267 u8 = BASE64_INVALID; 267 while ((u8 = cchStringMax > 0 ? g_au8CharToVal[*pszString] : BASE64_INVALID) == BASE64_SPACE)268 while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE) 268 269 pszString++, cchStringMax--; 269 270 if (u8 >= 64) … … 279 280 /* The fourth 6-bit group. */ 280 281 u8 = BASE64_INVALID; 281 while ((u8 = cchStringMax > 0 ? g_au8CharToVal[*pszString] : BASE64_INVALID) == BASE64_SPACE)282 while ((u8 = g_au8CharToVal[ch = cchStringMax > 0 ? *pszString : 0]) == BASE64_SPACE) 282 283 pszString++, cchStringMax--; 283 284 if (u8 >= 64) … … 305 306 */ 306 307 unsigned cbPad = 0; 307 unsigned ch = 0;308 308 if (u8 == BASE64_PAD) 309 309 { … … 326 326 return VERR_INVALID_BASE64_ENCODING; 327 327 } 328 else if (cchStringMax > 0)329 ch = *pszString;330 328 331 329 /*
Note:
See TracChangeset
for help on using the changeset viewer.