image_data - fix setRow implementation
This commit is contained in:
parent
4e671fd0e9
commit
12f051bf56
1 changed files with 3 additions and 1 deletions
|
@ -188,7 +188,9 @@ public:
|
|||
}
|
||||
inline void setRow(std::size_t row, std::size_t x0, std::size_t x1, pixel_type const* buf)
|
||||
{
|
||||
std::copy(buf, buf + (x1 - x0), pData_ + row * width_);
|
||||
assert(row < height_);
|
||||
assert ((x1 - x0) <= width_ );
|
||||
std::copy(buf, buf + (x1 - x0), pData_ + row * width_ + x0);
|
||||
}
|
||||
private:
|
||||
std::size_t width_;
|
||||
|
|
Loading…
Reference in a new issue