Skip to content
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

Merged
3 commits merged into from
Dec 14, 2019
Merged

Conversation

mkitzan
Copy link
Contributor

@mkitzan mkitzan commented Dec 12, 2019

Summary of the Pull Request

Uses the verification in at to ensure the index is correct (as @j4james suggests). If at throws, then returns false.

References

PR Checklist

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Can no longer repro the issue after the fix.

@mkitzan mkitzan marked this pull request as ready for review December 12, 2019 19:27
Copy link
Member

@zadjii-msft zadjii-msft left a 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

@mkitzan
Copy link
Contributor Author

mkitzan commented Dec 12, 2019

You're right this and #3936 should have tests. I'll commit those.

@j4james
Copy link
Collaborator

j4james commented Dec 13, 2019

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.

@mkitzan mkitzan changed the title Fixes SetColorTableEntry off-by-one error Fix SetColorTableEntry off-by-one error Dec 13, 2019
@zadjii-msft zadjii-msft added Area-VT Virtual Terminal sequence support AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal. labels Dec 13, 2019
@ghost
Copy link

ghost commented Dec 13, 2019

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 19babc0 into microsoft:master Dec 14, 2019
@mkitzan mkitzan deleted the set-color-fix branch December 14, 2019 00:43
@ghost
Copy link

ghost commented Jan 14, 2020

🎉Windows Terminal Preview v0.8.10091.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to define color 256 causes temporary hang
4 participants