summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2002-08-23 21:28:55 +0000
committerVeronika Irvine <veronika>2002-08-23 21:28:55 +0000
commit1b2eca9585033d3f45cd724ed534e7d54cf17a2d (patch)
treea120143909d58d20d794ba078bce64c7f0d84959
parent41dec2f3eec3ed9fd8b0476cb17c5316d2f374c0 (diff)
downloadeclipse.platform.swt-1b2eca9585033d3f45cd724ed534e7d54cf17a2d.tar.gz
eclipse.platform.swt-1b2eca9585033d3f45cd724ed534e7d54cf17a2d.tar.xz
eclipse.platform.swt-1b2eca9585033d3f45cd724ed534e7d54cf17a2d.zip
Removing \0 from end of text transferred with RTFTransfer
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
index 3041ddfbfe..822114dda4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/RTFTransfer.java
@@ -111,8 +111,8 @@ public Object nativeToJava(TransferData transferData){
try {
int cchWideChar = OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, null, 0);
if (cchWideChar != 0) {
- char[] lpWideCharStr = new char [cchWideChar];
- OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, lpWideCharStr, cchWideChar);
+ char[] lpWideCharStr = new char [cchWideChar - 1];
+ OS.MultiByteToWideChar (CodePage, OS.MB_PRECOMPOSED, lpMultiByteStr, -1, lpWideCharStr, lpWideCharStr.length);
return new String(lpWideCharStr);
}
} finally {