diff options
-rw-r--r-- | src/libcamera/formats.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 6a3b89a3..955c3fba 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -997,7 +997,7 @@ unsigned int PixelFormatInfo::stride(unsigned int width, unsigned int plane, return 0; } - if (plane > planes.size() || !planes[plane].bytesPerGroup) { + if (plane >= planes.size() || !planes[plane].bytesPerGroup) { LOG(Formats, Warning) << "Invalid plane index, stride is zero"; return 0; } |