Explorar el Código

Fix an error message in img2txt

When the default format is used and export fails, format was NULL
main
Pascal Terjan hace 4 meses
padre
commit
bd55d3b440
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/img2txt.c

+ 2
- 2
src/img2txt.c Ver fichero

@@ -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);


Cargando…
Cancelar
Guardar