Changeset 57189 in vbox
- Timestamp:
- Aug 5, 2015 10:50:04 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101941
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/string/RTUtf16Copy.cpp
r56290 r57189 38 38 if (RT_LIKELY(wcwSrc < cwcDst)) 39 39 { 40 memcpy(pwszDst, pwszSrc, wcwSrc + 1);40 memcpy(pwszDst, pwszSrc, (wcwSrc + 1) * sizeof(RTUTF16)); 41 41 return VINF_SUCCESS; 42 42 } … … 44 44 if (cwcDst != 0) 45 45 { 46 memcpy(pwszDst, pwszSrc, cwcDst - 1);46 memcpy(pwszDst, pwszSrc, (cwcDst - 1) * sizeof(RTUTF16)); 47 47 pwszDst[cwcDst - 1] = '\0'; 48 48 }
Note:
See TracChangeset
for help on using the changeset viewer.