Changeset 267:6383fb4cdfc3

Show
Ignore:
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
  • dwt/dnd/RTFTransfer.d

    r259 r267  
    7171 * @param transferData an empty <code>TransferData</code> object that will 
    7272 *      be filled in on return with the platform specific format of the data 
    73  *  
     73 * 
    7474 * @see Transfer#nativeToJava 
    7575 */ 
     
    9797 * @return a java <code>String</code> containing RTF text if the conversion was successful; 
    9898 *      otherwise null 
    99  *  
     99 * 
    100100 * @see Transfer#javaToNative 
    101101 */ 
     
    104104    int size = transferData.format * transferData.length / 8; 
    105105    if (size is 0) return null; 
    106     byte[] buffer = new byte[size]; 
    107106    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 ); 
    109108} 
    110109