diff options
author | Hubert Figuière <hub@figuiere.net> | 2023-07-19 11:58:49 -0400 |
---|---|---|
committer | Hubert Figuière <hub@figuiere.net> | 2023-07-19 14:03:22 -0400 |
commit | 83f97d05d51814527a4d26d179d664d129fe4034 (patch) | |
tree | 472212dff16089e76d8c7244ddf1fdf640b613d2 /demo | |
parent | 73b7263eabc664df72dea049871dda73cac142ae (diff) |
demo: better error handling in thumbc demo
Diffstat (limited to 'demo')
-rw-r--r-- | demo/thumbc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demo/thumbc.c b/demo/thumbc.c index 63febc1..e096177 100644 --- a/demo/thumbc.c +++ b/demo/thumbc.c @@ -1,7 +1,7 @@ /* * libopenraw - thumbc.c * - * Copyright (C) 2006,2008 Hubert Figuiere + * Copyright (C) 2006-2023 Hubert Figuière * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -100,9 +100,9 @@ main(int argc, char **argv) fprintf(output, "%u\n%u\n", x, y); fprintf(output, "%d\n", 255); } - writtenSize = fwrite(thumbnailData, dataSize, 1, output); + writtenSize = fwrite(thumbnailData, 1, dataSize, output); if(writtenSize != dataSize) { - printf("short write\n"); + printf("short write : %ld expected %ld\n", writtenSize, dataSize); } fclose(output); printf("output %ld bytes in '%s'\n", dataSize, outfname); |