-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 SetColorTableEntry off-by-one error #3938
Conversation
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.
I'd really love if a tests for this was added to src\cascadia\UnitTests_TerminalCore
too, but this is goodness one way or the other
You're right this and #3936 should have tests. I'll commit those. |
Only tests SetColorTableEntry right now
For the record, I was kind of hoping the exception could be handled further up in the call stack, so it could potentially catch exceptions from any operation - not just this particular case. That said, I don't know how feasible that is, and any fix is better than nothing, so I wouldn't object to this PR as is. |
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
🎉 Handy links: |
Summary of the Pull Request
Uses the verification in
at
to ensure the index is correct (as @j4james suggests). Ifat
throws, then returns false.References
PR Checklist
I'vediscussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: Trying to define color 256 causes temporary hang #3720Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Can no longer repro the issue after the fix.