fix segfault when pasting

This commit is contained in:
anthony 2020-12-28 16:24:48 +00:00
parent e46bb36669
commit eb5c01edf7
3 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,10 @@
[outlineView expandItem: [[historyItems allValues] firstObject] expandChildren: NO];
}
-(void)open: (id)sender {
NSLog(@"Open selected sites...", sender);
}
-(id)outlineView: (NSOutlineView*)outlineView child: (NSInteger)index ofItem: (id)item {
if (item == nil) {
return [[historyItems allValues] firstObject];

View File

@ -21,7 +21,7 @@ static void gnustep_clipboard_get(char **buffer, size_t *length) {
*length = len;
*buffer = malloc(len + 1);
strncpy(*buffer, cstring, len);
*buffer[len - 1] = '\0';
(*buffer)[len] = '\0';
}
// Save the provided clipboard for later retreival above