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

SDL_CreateTexture allows the creation of textures of size 0, which can lead to div by 0 errors #277

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.0
Reported for operating system, platform: All, All

Comments on the original bug report:

On 2010-04-15 21:03:56 +0000, Mason Wheeler wrote:

The summary pretty much says it all. When you go to render a texture, (at least on the GL renderer, and it's probably the same for D3D, not sure about the others,) it needs to perform division operations with the divisors being the height and width of the texture. If your height or width is 0, well... you can guess what would happen.

The appropriate remedy would be to have SDL_CreateTexture fail and give an error if either the height or the width passed to is is 0.

On 2010-04-15 21:27:34 +0000, Sam Lantinga wrote:

This is fixed, thanks!

changeset: 4433:9fa97c6b0014
tag: tip
user: Sam Lantinga slouken@libsdl.org
date: Thu Apr 15 21:27:32 2010 -0700
summary: Fixed bug 984

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant