-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LT-21839: Avoid crash and allow paste success with no ws #174
Conversation
Analyzing the data that caused the crash showed that in some edge cases no writing system can be identified in MakeSubString. This could cause an empty builder to have no writing system. I couldn't identify any actual side effects in this edge case so I left the assert, but allowed the paste to succeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @jasonleenaylor)
Src/views/VwSelection.cpp
line 5358 at r1 (raw file):
} if(wsNew <= 0)
Could we just put the Assert and return inside of the first "if (wsNew <=0)" instead of having a duplicate if statement?
Previously, JakeOliver28 (Jake Oliver) wrote…
Good question. The value could have been changed inside of the first if statement, this covers the case where there is no m_qtsbProp and also if trying to get the writing system from those properties fails. |
Previously, jasonleenaylor (Jason Naylor) wrote…
Hmm, I retract, we can still put this inside the first if. |
Previously, jasonleenaylor (Jason Naylor) wrote…
After drinking more coffee I retract my retraction, if we want it to 'return' under the correct conditions a second check is necessary even if we put it inside the first if. So this way reduces the nesting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion
Analyzing the data that caused the crash showed that in some edge
cases no writing system can be identified in MakeSubString.
This could cause an empty builder to have no writing system.
I couldn't identify any actual side effects in this edge case so
I left the assert, but allowed the paste to succeed
This change is