diff --git a/platform/CMSWindowsClipboardTextConverter.cpp b/platform/CMSWindowsClipboardTextConverter.cpp index bde47fd4..da5847e4 100755 --- a/platform/CMSWindowsClipboardTextConverter.cpp +++ b/platform/CMSWindowsClipboardTextConverter.cpp @@ -33,7 +33,7 @@ CMSWindowsClipboardTextConverter::doToIClipboard(const CString& data) const { // convert and strip nul terminator 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); } return dst; diff --git a/platform/CMSWindowsClipboardUTF16Converter.cpp b/platform/CMSWindowsClipboardUTF16Converter.cpp index ab314f0c..3422b938 100755 --- a/platform/CMSWindowsClipboardUTF16Converter.cpp +++ b/platform/CMSWindowsClipboardUTF16Converter.cpp @@ -33,7 +33,7 @@ CMSWindowsClipboardUTF16Converter::doToIClipboard(const CString& data) const { // convert and strip nul terminator 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); } return dst;