Changeset 3160 in vbox
- Timestamp:
- Jun 19, 2007 5:26:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/utf-16.cpp
r3125 r3160 477 477 if (cch <= cchResult) 478 478 return VERR_BUFFER_OVERFLOW; 479 // cchResult = cch;480 479 pszResult = *ppsz; 481 480 } … … 484 483 *ppsz = NULL; 485 484 fShouldFree = true; 486 // cchResult = RT_MAX(cch, cchResult + 1);487 485 cch = RT_MAX(cch, cchResult + 1); 488 486 pszResult = (char *)RTMemAlloc(cch); … … 490 488 if (pszResult) 491 489 { 492 rc = rtUtf16RecodeAsUtf8(pwszString, cwcString, pszResult, cch , &cchResult);490 rc = rtUtf16RecodeAsUtf8(pwszString, cwcString, pszResult, cch - 1, &cch); 493 491 if (RT_SUCCESS(rc)) 494 492 {
Note:
See TracChangeset
for help on using the changeset viewer.