Changeset 267:6383fb4cdfc3
- Timestamp:
- 07/06/08 09:35:34
(3 months ago)
- Author:
- Frank Benoit <benoit@tionex.de>
- branch:
- default
- Message:
Fix: missing .dup
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r259 |
r267 |
|
| 71 | 71 | * @param transferData an empty <code>TransferData</code> object that will |
|---|
| 72 | 72 | * be filled in on return with the platform specific format of the data |
|---|
| 73 | | * |
|---|
| | 73 | * |
|---|
| 74 | 74 | * @see Transfer#nativeToJava |
|---|
| 75 | 75 | */ |
|---|
| … | … | |
| 97 | 97 | * @return a java <code>String</code> containing RTF text if the conversion was successful; |
|---|
| 98 | 98 | * otherwise null |
|---|
| 99 | | * |
|---|
| | 99 | * |
|---|
| 100 | 100 | * @see Transfer#javaToNative |
|---|
| 101 | 101 | */ |
|---|
| … | … | |
| 104 | 104 | int size = transferData.format * transferData.length / 8; |
|---|
| 105 | 105 | if (size is 0) return null; |
|---|
| 106 | | byte[] buffer = new byte[size]; |
|---|
| 107 | 106 | char [] chars = transferData.pValue[ 0 .. size]; |
|---|
| 108 | | return new ArrayWrapperString( chars[ 0 .. tango.text.Util.locate( chars, '\0' ) ] ); |
|---|
| | 107 | return new ArrayWrapperString( chars[ 0 .. tango.text.Util.locate( chars, '\0' ) ].dup ); |
|---|
| 109 | 108 | } |
|---|
| 110 | 109 | |
|---|