Skip to content
Snippets Groups Projects
Commit e0938e64 authored by George Nachman's avatar George Nachman
Browse files

Make a copy of the raw line block data in -[LineBlock dictionary]. It looks...

Make a copy of the raw line block data in -[LineBlock dictionary]. It looks like OS 10.13 needs the data in the coder asynchronously. This was always a risky optimization. It used to work because nothing could be mutated between willEncode and the actual encoding, but it seems that is no longer the case.
parent a52f8dea
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -1387,9 +1387,8 @@ static int Search(NSString* needle,
}
 
- (NSDictionary *)dictionary {
NSData *rawBufferData = [NSData dataWithBytesNoCopy:raw_buffer
length:[self rawSpaceUsed] * sizeof(screen_char_t)
freeWhenDone:NO];
NSData *rawBufferData = [NSData dataWithBytes:raw_buffer
length:[self rawSpaceUsed] * sizeof(screen_char_t)];
return @{ kLineBlockRawBufferKey: rawBufferData,
kLineBlockBufferStartOffsetKey: @(buffer_start - raw_buffer),
kLineBlockStartOffsetKey: @(start_offset),
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment