TWebPSetupEncode(): fix logic problem (and instead of or) in test that checks input is 8bit unsigned data

This commit is contained in:
Even Rouault 2020-05-31 21:18:21 +02:00
parent 6b3b189d5b
commit 8a58319106
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D

View File

@ -333,7 +333,7 @@ TWebPSetupEncode(TIFF* tif)
} }
/* check bits per sample and data type */ /* check bits per sample and data type */
if ((nBitsPerSample != 8) && (sampleFormat != 1)) { if ((nBitsPerSample != 8) || (sampleFormat != SAMPLEFORMAT_UINT)) {
TIFFErrorExt(tif->tif_clientdata, module, TIFFErrorExt(tif->tif_clientdata, module,
"WEBP driver requires 8 bit unsigned data"); "WEBP driver requires 8 bit unsigned data");
return 0; return 0;