Closed wr7 closed 8 months ago
If the matrix animation is enabled and the terminal height is 3, the modulus operation on draw.c::724 will raise an Arithmetic Exception. This will cause ly to crash.
matrix
ly
724 | s->length[j] = (int) rand() % (buf->height - 3) + 3; ^^^^^^^^^^^^^^^^^^^
The same thing could happen on line 861:
861 | s->length[j] = (int) rand() % (buf->height - 3) + 3; ^^^^^^^^^^^^^^^^^^^
Ly will not attempt to display the matrix animation if buf->height <= 3.
buf->height <= 3
Current behavior
If the
matrix
animation is enabled and the terminal height is 3, the modulus operation on draw.c::724 will raise an Arithmetic Exception. This will causely
to crash.The same thing could happen on line 861:
New behavior
Ly will not attempt to display the matrix animation if
buf->height <= 3
.