From cb1346b640017a821105e8d8b4cc51640858c8d1 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Wed, 23 Oct 2024 19:35:15 +0300 Subject: Ignore zero bytes between markers in built-in jpeg decoder For consistency between built-in and imageviewer jpeg decoders. Change-Id: I2aab5923ee096b99a7def49dcdc436b872823971 --- apps/recorder/jpeg_load.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/recorder/jpeg_load.c b/apps/recorder/jpeg_load.c index eccd781f9b..154a57b98c 100644 --- a/apps/recorder/jpeg_load.c +++ b/apps/recorder/jpeg_load.c @@ -944,8 +944,9 @@ static int process_markers(struct jpeg* p_jpeg) int ret = 0; /* returned flags */ bool done = false; - while (!done && (c = e_getc(p_jpeg, -1))) + while (!done) { + c = e_getc(p_jpeg, -1); if (c != 0xFF) /* no marker? */ { JDEBUGF("Non-marker data\n"); -- cgit v1.2.3