- Notifications
You must be signed in to change notification settings - Fork3.8k
Refactored test from #3989 to work correctly and also apply to #4191 and fixed the bug being tested#4215
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Fixed overflow bug in src_c/draw.c:draw_fillpoly frompygame#4191 by changing y, miny, maxy, x1, y1, x2, y2 from int type to double
Hi, I have warnings as errors on CI. There's some warnings as errors here:https://ci.appveyor.com/project/pygame/pygame/builds/49689982/job/m6kny35txym1rm4q#L792 src_c/draw.c(2359):errorC2220:warningtreatedaserror-no'object'filegeneratedsrc_c/draw.c(2359):warningC4244:'function':conversionfrom'double'to'int',possiblelossofdatasrc_c/draw.c(2405):warningC4244:'function':conversionfrom'double'to'int',possiblelossofdatasrc_c/draw.c(2424):warningC4244:'function':conversionfrom'double'to'int',possiblelossofdata You could try adding an explicit cast to int (if it makes sense), and that should take care of the warnings. |
Cool, it looks like that warning issue is fixed. Seems there's a clang-format issue left. We recently started using pre-commit tool to check things before committing. https://pre-commit.com/#install After you |
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.
🎉🎈 thanks
Fixed overflow bug in src_c/draw.c:draw_fillpoly from#4191 by changing y, miny, maxy, x1, y1, x2, y2 from int type to double. Uncommented and refactored a test that was previously meant to test the same bug
fixes#4191
fixes#3989