Browse Source

* Fix a crash when font opening fails.

pull/1/head
Sam Hocevar sam 18 years ago
parent
commit
93f60439fd
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      src/main.c

+ 7
- 4
src/main.c View File

@@ -48,7 +48,7 @@ int main(int argc, char *argv[])


cucul_buffer_t *buffer; cucul_buffer_t *buffer;


int i, j;
int i, j, ret;


unsigned int flag_gay = 0; unsigned int flag_gay = 0;
unsigned int flag_metal = 0; unsigned int flag_metal = 0;
@@ -170,11 +170,14 @@ int main(int argc, char *argv[])
} }


if(!strcasecmp(cx->font, "mono9")) if(!strcasecmp(cx->font, "mono9"))
init_big(cx);
ret = init_big(cx);
else if(!strcasecmp(cx->font, "term")) else if(!strcasecmp(cx->font, "term"))
init_tiny(cx);
ret = init_tiny(cx);
else else
init_figlet(cx);
ret = init_figlet(cx);

if(ret)
return -1;


if(optind >= argc) if(optind >= argc)
{ {


Loading…
Cancel
Save