From b6cf52d5b83a253eb675120dd417f1d5680c13e2 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 20 Apr 2021 14:23:57 -0700 Subject: [PATCH] WebPIoInitFromOptions: treat use_scaling 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:1196773, chromium:1196775, chromium:1196480 Change-Id: I3603b806884cfc6969b093d06b7980b0cc13199b --- 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 873d2318..77a54c55 100644 --- a/src/dec/webp_dec.c +++ b/src/dec/webp_dec.c @@ -821,7 +821,7 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options, io->mb_h = h; // Scaling - io->use_scaling = (options != NULL) && (options->use_scaling > 0); + io->use_scaling = (options != NULL) && options->use_scaling; if (io->use_scaling) { int scaled_width = options->scaled_width; int scaled_height = options->scaled_height;