From 3b12b7f4b42ab6090070b9ceb80cc736002513f4 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 20 Apr 2021 14:23:57 -0700 Subject: [PATCH] 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 --- src/dec/webp_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dec/webp_dec.c b/src/dec/webp_dec.c index 2c694699..873d2318 100644 --- a/src/dec/webp_dec.c +++ b/src/dec/webp_dec.c @@ -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;