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

WindowBuilder's build() method returns with wrong HeightOverflows's value #1432

Open
waqs102 opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@waqs102
Copy link

waqs102 commented Sep 12, 2024

When WindowBuilder tries to build a window with height overflow, it returns WindowBuildError::HeightOverflows containing self.width value instead of self.height on the line 1148 of video.rs:

1138 pub fn build(&self) -> Result<Window, WindowBuildError> {
1139     use self::WindowBuildError::*;
// --snip--
1144     if self.width >= (1 << 31) {
1145         return Err(WidthOverflows(self.width));
1146     }
1147     if self.height >= (1 << 31) {
1148         return Err(HeightOverflows(self.width));
1149     }
// --snip--
1186 }

return Err(HeightOverflows(self.width));

@waqs102 waqs102 changed the title WindowBuilder::build returns with wrong HeightOverflows value WindowBuilder 'build' method returns with wrong HeightOverflows value Sep 12, 2024
@waqs102 waqs102 changed the title WindowBuilder 'build' method returns with wrong HeightOverflows value WindowBuilder build() method returns with wrong HeightOverflows value Sep 12, 2024
@waqs102 waqs102 changed the title WindowBuilder build() method returns with wrong HeightOverflows value WindowBuilder's build() method returns with wrong HeightOverflows's value Sep 12, 2024
antonilol added a commit to antonilol/rust-sdl2 that referenced this issue Sep 18, 2024
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