add a molly guard

This commit is contained in:
tTh 2023-07-04 17:25:12 +02:00
parent 9e36c8b64c
commit b0fc5107c9

View File

@ -49,6 +49,14 @@ fprintf(stderr, ">>> %s ( %p %p %p %f )\n", __func__,
s1, s2, d, coef);
#endif
/* sanity check here ? or may be ask the
caller to do it himself ?
*/
if ( (coef < 0.0) || (coef >= 1.0) ){
fprintf(stderr, "%s: coef %f out of range\n", __func__, coef);
return -8;
}
foo = fimg_images_not_compatible(s1, s2);
if (foo) {
fprintf(stderr, "compat s1 s2 -> %d\n", foo);