diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-14 15:24:18 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-04-14 15:24:18 +0200 |
| commit | 7e2defc10d3816eaab14369941a84b68c8d1d2bc (patch) | |
| tree | 99a3216344c5ca2271a43b6a592f15dfb80cfbee /src/Fl_cocoa.mm | |
| parent | 4768ebaf8bd75ac3bab6290f9803a2019af062fd (diff) | |
macOS: remove calls to deprecated API
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index da3d27116..5db3bae33 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2545,7 +2545,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil; else if ( [[pboard types] containsObject:UTF8_pasteboard_type] ) { NSData *data = [pboard dataForType:UTF8_pasteboard_type]; DragData = (char *)malloc([data length] + 1); - [data getBytes:DragData]; + [data getBytes:DragData length:[data length]]; DragData[[data length]] = 0; Fl_Screen_Driver::convert_crlf(DragData, strlen(DragData)); } @@ -3528,7 +3528,7 @@ static int get_plain_text_from_clipboard(int clipboard) free(aux_c); } else { - [data getBytes:fl_selection_buffer[clipboard]]; + [data getBytes:fl_selection_buffer[clipboard] length:[data length]]; } fl_selection_buffer[clipboard][len - 1] = 0; length = Fl_Screen_Driver::convert_crlf(fl_selection_buffer[clipboard], len - 1); // turn all \r characters into \n: |
