Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
illume merged 3 commits intopygame:mainfromdillon-duff:main
Apr 27, 2024

Conversation

@dillon-duff
Copy link

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

illume reacted with hooray emoji
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
@illume
Copy link
Member

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.

@illume
Copy link
Member

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

python -m pip install pre-commitpre-commit installpre-commit run --all-files

After youpre-commit install, it will run the checks at commit time. So thepre-commit run --all-files is not necessary.

@illumeillume added bug drawpygame.draw labelsApr 27, 2024
Copy link
Member

@illumeillume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🎉🎈 thanks

dillon-duff reacted with laugh emoji
@illumeillume merged commit7a1a2c5 intopygame:mainApr 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@illumeillumeillume approved these changes

Assignees

No one assigned

Labels

bugdrawpygame.draw

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug about pygame.draw.polygon() pygame.draw.polygon() not working properly with large coordinates

3 participants

@dillon-duff@illume@duffdl

[8]ページ先頭

©2009-2025 Movatter.jp