Bartek GÄ…siorzewski
2018-05-07 ae4ec1a06d5b4c9bcb5647cf555aafd4e5f800f7
Exit with nonzero status on error
2 files modified
8 ■■■■ changed files
src/image.c 2 ●●● patch | view | raw | blame | history
src/utils.c 6 ●●●● patch | view | raw | blame | history
src/image.c
@@ -1629,7 +1629,7 @@
    unsigned char *data = stbi_load(filename, &w, &h, &c, channels);
    if (!data) {
        fprintf(stderr, "Cannot load image \"%s\"\nSTB Reason: %s\n", filename, stbi_failure_reason());
        exit(0);
        exit(1);
    }
    if(channels) c = channels;
    int i,j,k;
src/utils.c
@@ -208,19 +208,19 @@
{
    perror(s);
    assert(0);
    exit(-1);
    exit(1);
}
void malloc_error()
{
    fprintf(stderr, "Malloc error\n");
    exit(-1);
    exit(1);
}
void file_error(char *s)
{
    fprintf(stderr, "Couldn't open file: %s\n", s);
    exit(0);
    exit(1);
}
list *split_str(char *s, char delim)