summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2021-01-26 15:05:24 -0600
committerJeff Epler <jepler@gmail.com>2021-01-26 16:51:31 -0600
commit189ec2fc60f8dbfb5b054174f0062b9baeb27ca3 (patch)
treebb39c19932b580968ec791cb3482919a71796a79 /shared-bindings
parent1c10ec99a774538e0e39414beb99ca3f0a0b5694 (diff)
Disallow tile=0
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/rgbmatrix/RGBMatrix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c
index 3b2039e4d..2a81bb53c 100644
--- a/shared-bindings/rgbmatrix/RGBMatrix.c
+++ b/shared-bindings/rgbmatrix/RGBMatrix.c
@@ -214,9 +214,9 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
int tile = args[ARG_tile].u_int;
- if (tile < 0) {
+ if (tile <= 0) {
mp_raise_ValueError_varg(
- translate("tile must be greater than or equal to zero"));
+ translate("tile must be greater than zero"));
}
int computed_height = (rgb_count / 3) * (1 << (addr_count)) * tile;