fixes for win32 clipboard due to CUnicode nul terminator changes.

This commit is contained in:
crs 2002-07-24 19:24:21 +00:00
parent a150f64e9c
commit 2e6e8e179a
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ CMSWindowsClipboardTextConverter::doToIClipboard(const CString& data) const
{ {
// convert and strip nul terminator // convert and strip nul terminator
CString dst = CUnicode::textToUTF8(data); CString dst = CUnicode::textToUTF8(data);
if (dst.size() > 0 && dst[size() - 1] == '\0') { if (dst.size() > 0 && dst[dst.size() - 1] == '\0') {
dst.erase(dst.size() - 1); dst.erase(dst.size() - 1);
} }
return dst; return dst;

View File

@ -33,7 +33,7 @@ CMSWindowsClipboardUTF16Converter::doToIClipboard(const CString& data) const
{ {
// convert and strip nul terminator // convert and strip nul terminator
CString dst = CUnicode::UTF16ToUTF8(data); CString dst = CUnicode::UTF16ToUTF8(data);
if (dst.size() > 0 && dst[size() - 1] == '\0') { if (dst.size() > 0 && dst[dst.size() - 1] == '\0') {
dst.erase(dst.size() - 1); dst.erase(dst.size() - 1);
} }
return dst; return dst;