apps: common: image: Fix assertion
`plane` must be strictly less than the vector's size, it cannot be equal to it. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -98,12 +98,12 @@ unsigned int Image::numPlanes() const
|
||||
|
||||
Span<uint8_t> Image::data(unsigned int plane)
|
||||
{
|
||||
assert(plane <= planes_.size());
|
||||
assert(plane < planes_.size());
|
||||
return planes_[plane];
|
||||
}
|
||||
|
||||
Span<const uint8_t> Image::data(unsigned int plane) const
|
||||
{
|
||||
assert(plane <= planes_.size());
|
||||
assert(plane < planes_.size());
|
||||
return planes_[plane];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user