mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 23:09:45 +03:00
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:
parent
8d2cd0b5b8
commit
b544ce1c19
1 changed files with 2 additions and 2 deletions
|
@ -98,12 +98,12 @@ unsigned int Image::numPlanes() const
|
||||||
|
|
||||||
Span<uint8_t> Image::data(unsigned int plane)
|
Span<uint8_t> Image::data(unsigned int plane)
|
||||||
{
|
{
|
||||||
assert(plane <= planes_.size());
|
assert(plane < planes_.size());
|
||||||
return planes_[plane];
|
return planes_[plane];
|
||||||
}
|
}
|
||||||
|
|
||||||
Span<const uint8_t> Image::data(unsigned int plane) const
|
Span<const uint8_t> Image::data(unsigned int plane) const
|
||||||
{
|
{
|
||||||
assert(plane <= planes_.size());
|
assert(plane < planes_.size());
|
||||||
return planes_[plane];
|
return planes_[plane];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue