浏览代码

Merge d33a9ca2b7 into f42aa68fc7

undefined
Josef Möllers GitHub 3 年前
父节点
当前提交
cab28e5504
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. +8
    -2
      src/img2txt.c

+ 8
- 2
src/img2txt.c 查看文件

@@ -177,7 +177,13 @@ int main(int argc, char **argv)
}

/* Assume a 6×10 font */
if(!cols && !lines)
if(!i->w || !i->h)
{
fprintf(stderr, "%s: image size is 0\n", argv[0]);
lines = 0;
cols = 0;
}
else if(!cols && !lines)
{
cols = 60;
lines = cols * i->h * font_width / i->w / font_height;
@@ -214,7 +220,7 @@ int main(int argc, char **argv)
export = caca_export_canvas_to_memory(cv, format?format:"ansi", &len);
if(!export)
{
fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format);
fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format?format:"ansi");
}
else
{


正在加载...
取消
保存