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

Beta 8 does not have crashes in OffsetOfWrappedLine. Increase testing fraction...

Beta 8 does not have crashes in OffsetOfWrappedLine. Increase testing fraction to 10% since I haven't seen any crashes yet in the nightly build
parent 652db390
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -563,7 +563,6 @@ int OffsetOfWrappedLine(screen_char_t* p, int n, int length, int width, BOOL may
}
 
int spans;
#warning I think the cache was causing crashes in OffsetOfWrappedLine later in this function. See if that is true in beta 8.
const BOOL useCache = gUseCachingNumberOfLines;
if (useCache && _mayHaveDoubleWidthCharacter) {
LineBlockMetadata *metadata = &metadata_[i];
Loading
Loading
@@ -572,7 +571,7 @@ int OffsetOfWrappedLine(screen_char_t* p, int n, int length, int width, BOOL may
spans = metadata->number_of_wrapped_lines;
 
#warning Remove this when I feel confident it is correct
if (arc4random_uniform(100) == 0) {
if (arc4random_uniform(100) < 10) {
// Correctness checking code follows. Remove this for speed when I think it's correct.
int referenceSpans = NumberOfFullLines(buffer_start + prev,
length,
Loading
Loading
@@ -612,7 +611,7 @@ int OffsetOfWrappedLine(screen_char_t* p, int n, int length, int width, BOOL may
width:width
metadata:&metadata_[i]];
#warning Remove this when I feel confident it is correct
if (arc4random_uniform(100) == 0) {
if (arc4random_uniform(100) < 10) {
int correctOffset = OffsetOfWrappedLine(buffer_start + prev,
*lineNum,
length,
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