mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-14 05:33:59 -04:00
generate-alt-random: assert that lines/cols/width/height are > 0
This commit is contained in:
parent
17bc2f5070
commit
da5a3bae3e
1 changed files with 5 additions and 0 deletions
|
|
@ -59,6 +59,11 @@ def main():
|
||||||
if lines is None or cols is None or height is None or width is None:
|
if lines is None or cols is None or height is None or width is None:
|
||||||
raise Exception('could not get terminal width/height; use --rows and --cols')
|
raise Exception('could not get terminal width/height; use --rows and --cols')
|
||||||
|
|
||||||
|
assert lines > 0, f'{lines}'
|
||||||
|
assert cols > 0, f'{cols}'
|
||||||
|
assert width > 0, f'{width}'
|
||||||
|
assert height > 0, f'{height}'
|
||||||
|
|
||||||
# Number of characters to write to screen
|
# Number of characters to write to screen
|
||||||
count = 256 * 1024**1
|
count = 256 * 1024**1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue