- Timestamp:
- Jun 15, 2007 4:52:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/utf-16.cpp
r2981 r3125 461 461 */ 462 462 size_t cchResult; 463 int rc = rtUtf16CalcUtf8Length(pwszString, RTSTR_MAX, &cchResult);463 int rc = rtUtf16CalcUtf8Length(pwszString, cwcString, &cchResult); 464 464 if (RT_SUCCESS(rc)) 465 465 { … … 477 477 if (cch <= cchResult) 478 478 return VERR_BUFFER_OVERFLOW; 479 cchResult = cch;479 // cchResult = cch; 480 480 pszResult = *ppsz; 481 481 } … … 484 484 *ppsz = NULL; 485 485 fShouldFree = true; 486 cchResult = RT_MAX(cch, cchResult + 1); 487 pszResult = (char *)RTMemAlloc(cchResult); 486 // cchResult = RT_MAX(cch, cchResult + 1); 487 cch = RT_MAX(cch, cchResult + 1); 488 pszResult = (char *)RTMemAlloc(cch); 488 489 } 489 490 if (pszResult) 490 491 { 491 rc = rtUtf16RecodeAsUtf8(pwszString, RTSTR_MAX, pszResult, cchResult, &cchResult);492 rc = rtUtf16RecodeAsUtf8(pwszString, cwcString, pszResult, cch, &cchResult); 492 493 if (RT_SUCCESS(rc)) 493 494 {
Note:
See TracChangeset
for help on using the changeset viewer.