Переглянути джерело

Fix an error message in img2txt

When the default format is used and export fails, format was NULL
main
Pascal Terjan 2 місяці тому
джерело
коміт
bd55d3b440
1 змінених файлів з 2 додано та 2 видалено
  1. +2
    -2
      src/img2txt.c

+ 2
- 2
src/img2txt.c Переглянути файл

@@ -84,7 +84,7 @@ int main(int argc, char **argv)
size_t len;
struct image *i;
unsigned int cols = 0, lines = 0, font_width = 6, font_height = 10;
char *format = NULL;
char *format = "ansi";
char *dither = NULL;
float gamma = -1, brightness = -1, contrast = -1;

@@ -218,7 +218,7 @@ int main(int argc, char **argv)

unload_image(i);

export = caca_export_canvas_to_memory(cv, format?format:"ansi", &len);
export = caca_export_canvas_to_memory(cv, format, &len);
if(!export)
{
fprintf(stderr, "%s: Can't export to format '%s'\n", argv[0], format);


Завантаження…
Відмінити
Зберегти