Skip to content

Fix overflow in rgb() parsing. #141

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

Merged
merged 1 commit into from
Apr 24, 2017
Merged

Fix overflow in rgb() parsing. #141

merged 1 commit into from
Apr 24, 2017

Conversation

SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Apr 24, 2017

some_f32 as i32 would warp


This change is Reviewable

`some_f32 as i32` would warp
@SimonSapin
Copy link
Member Author

@bors-servo r+

Fixes failures in servo/servo#16589

@bors-servo
Copy link
Contributor

📌 Commit 932539b has been approved by SimonSapin

@bors-servo
Copy link
Contributor

⌛ Testing commit 932539b with merge af83617...

bors-servo pushed a commit that referenced this pull request Apr 24, 2017
Fix overflow in rgb() parsing.

`some_f32 as i32` would warp

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/141)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - status-travis
Approved by: SimonSapin
Pushing af83617 to master...

@bors-servo bors-servo merged commit 932539b into master Apr 24, 2017
@SimonSapin SimonSapin deleted the rgb-clamp branch April 24, 2017 21:59
clamp_256_f32(val * 256.)
}

fn clamp_256_f32(val: f32) -> u8 {
Copy link
Member

Choose a reason for hiding this comment

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

doc comment please, on both

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

Successfully merging this pull request may close these issues.

3 participants