Skip to content

Commit 189ec2f

Browse files
committed
Disallow tile=0
1 parent 1c10ec9 commit 189ec2f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

locale/circuitpython.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,7 @@ msgid "threshold must be in the range 0-65536"
37113711
msgstr ""
37123712

37133713
#: shared-bindings/rgbmatrix/RGBMatrix.c
3714-
msgid "tile must be greater than or equal to zero"
3714+
msgid "tile must be greater than zero"
37153715
msgstr ""
37163716

37173717
#: shared-bindings/time/__init__.c

shared-bindings/rgbmatrix/RGBMatrix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
214214

215215
int tile = args[ARG_tile].u_int;
216216

217-
if (tile < 0) {
217+
if (tile <= 0) {
218218
mp_raise_ValueError_varg(
219-
translate("tile must be greater than or equal to zero"));
219+
translate("tile must be greater than zero"));
220220
}
221221

222222
int computed_height = (rgb_count / 3) * (1 << (addr_count)) * tile;

0 commit comments

Comments
 (0)