better error message and aborting

This commit is contained in:
tth 2021-04-23 13:39:38 +02:00
parent 487b091db3
commit 6b5412edcd
1 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,12 @@ static unsigned short modz;
* check in image sizes are correct
*/
if ( d->width != w*2 || d->height != h*2 ) {
fprintf(stderr, "%s : dimension error\n", __func__);
fprintf(stderr, "%s: dimension error\n", __func__);
fprintf(stderr, "\tw = %d h = %d\n", w, h);
fprintf(stderr, "\tdest image is %dx%d\n", d->width, d->height);
#if MUST_ABORT
abort();
#endif
return -2;
}