aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-02 17:29:51 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-09-02 17:29:51 +0200
commit96fe104e6b1c1452a8408bb46baa73d2b93bcf0e (patch)
tree88a883853fb100d54d35921c0d3e7c6b39a899ee /src/main.c
parentf546868b1f4d0eae4dc3ecc26035829cf0f2f721 (diff)
downloadAsciiMap-96fe104e6b1c1452a8408bb46baa73d2b93bcf0e.tar.gz
bitmap_strerror: More verbose bitmap failures
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 325f8af..90bfcc0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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) {