WebPIoInitFromOptions: treat use_cropping as a bool

this matches the description in WebPDecoderOptions and prevents a
mismatch between the user supplied options and the ones used by io.

Bug: chromium:1196480
Change-Id: Id464f999d737078078f9d21afe25b349317f5ab4
This commit is contained in:
James Zern 2021-04-20 14:23:57 -07:00
parent 595fa13f83
commit 3b12b7f4b4

View File

@ -799,7 +799,7 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options,
int x = 0, y = 0, w = W, h = H;
// Cropping
io->use_cropping = (options != NULL) && (options->use_cropping > 0);
io->use_cropping = (options != NULL) && options->use_cropping;
if (io->use_cropping) {
w = options->crop_width;
h = options->crop_height;