Skip to content

Commit

Permalink
Merge pull request #164 from m4rw3r/master
Browse files Browse the repository at this point in the history
Bitmap: Use abs(pitch) * rows as the bitmap length
  • Loading branch information
bvssvni committed Jul 26, 2015
2 parents 6e78c85 + abc3749 commit 721fb3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Bitmap {
unsafe {
slice::from_raw_parts(
(*self.raw).buffer,
(self.width() * self.rows()) as usize
(self.pitch().abs() * self.rows()) as usize
)
}
}
Expand Down

0 comments on commit 721fb3a

Please sign in to comment.