diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-09-02 17:29:51 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-09-02 17:29:51 +0200 |
commit | 96fe104e6b1c1452a8408bb46baa73d2b93bcf0e (patch) | |
tree | 88a883853fb100d54d35921c0d3e7c6b39a899ee /src/main.c | |
parent | f546868b1f4d0eae4dc3ecc26035829cf0f2f721 (diff) | |
download | AsciiMap-96fe104e6b1c1452a8408bb46baa73d2b93bcf0e.tar.gz |
bitmap_strerror: More verbose bitmap failures
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -51,9 +51,10 @@ int main(int argc, char *argv[]) uint8_t brightness_min = 0x00; uint8_t brightness_max = 0xff; - if ( bitmap_read(args.filename, &bitmap) ) { - printf("Error reading file\n"); - return 1; + int ret = bitmap_read(args.filename, &bitmap); + if ( ret ) { + printf( "%s\n", bitmap_strerror(ret) ); + return ret; } if(args.fit_width > 0) { |