Images: Fix Division by 0 error. Closes #410

This commit is contained in:
Dylan Araps 2016-11-02 09:44:25 +11:00
parent 7b2dcea117
commit 453a38d79f
1 changed files with 1 additions and 1 deletions

View File

@ -2047,7 +2047,7 @@ getimage() {
fi
# If $img isn't a file fallback to ascii mode.
if [ ! -f "$img" ] || [ "$term_width" -le 10 ]; then
if [ ! -f "$img" ] || [ -z "$term_width" ] || [ "$term_width" -le 10 ]; then
image="ascii"
getascii