-
Notifications
You must be signed in to change notification settings - Fork 28
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 int overflow #33
Fix int overflow #33
Conversation
8a69844
to
7879a6d
Compare
Test run here: https://github.com/cpuguy83/go-ansiterm/pull/5/checks?check_run_id=2853454830 Apparently there's another bug as well which should be fixed by #27 |
69bcbca
to
d70676d
Compare
d227edb
to
cce61a1
Compare
See golang/go#32479 Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
cce61a1
to
5a086cd
Compare
// syscall uses negative numbers | ||
// windows package uses very big uint32 | ||
// Keep these switches split so we don't have to convert ints too much. | ||
switch uint32(nFile) { |
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 went over a few variations as well; would casting to int64
work? docker/cli@97da45d
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.
It does, but I figured it would be better to split since these are really different types.
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.
Yeah, I think ultimately we should drop the syscall one (and introduce a breaking change once)
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.
LGTM
This time we got it for sure. |
Closes #27