summaryrefslogtreecommitdiff
path: root/kms++util/src/testpat.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-12-18 12:30:25 +0200
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-12-18 12:35:28 +0200
commit44e660203bcbab509b0ad08b0038192ec471a8de (patch)
tree3efd0f7ea01e31a8384bc15a5ec63a09b25bf2a3 /kms++util/src/testpat.cpp
parent48a3b80996d0dce7e472318c2090e5f4df901567 (diff)
testpat: Fix div by zero cppcheck warning
Diffstat (limited to 'kms++util/src/testpat.cpp')
-rw-r--r--kms++util/src/testpat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kms++util/src/testpat.cpp b/kms++util/src/testpat.cpp
index 8444ce0..fe0988e 100644
--- a/kms++util/src/testpat.cpp
+++ b/kms++util/src/testpat.cpp
@@ -476,7 +476,7 @@ void draw_test_pattern_multi(IFramebuffer& fb, const TestPatternOptions& options
for (size_t p = 0; p < info.num_planes; ++p)
v_sub = max(v_sub, info.planes[p].vsub);
- if (fb.height() % v_sub)
+ if (!v_sub || fb.height() % v_sub)
throw invalid_argument("FB height must be divisible with vsub");
// Create the mmaps before starting the threads