aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-13 12:44:08 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-13 12:44:23 +0200
commitb308b5da18cae1d58c84ea7d581e2c5445886fca (patch)
treec07eeb11c9587559ca808eff2ccdf0246606ee62
parent1577961aa2d8d8e37df82b2179e8b843f03cbf7d (diff)
downloadfiv-b308b5da18cae1d58c84ea7d581e2c5445886fca.tar.gz
fiv-b308b5da18cae1d58c84ea7d581e2c5445886fca.tar.xz
fiv-b308b5da18cae1d58c84ea7d581e2c5445886fca.zip
Fix thumbnail extraction
-rw-r--r--fiv-thumbnail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fiv-thumbnail.c b/fiv-thumbnail.c
index 5515893..9d58140 100644
--- a/fiv-thumbnail.c
+++ b/fiv-thumbnail.c
@@ -332,11 +332,12 @@ extract_libraw_unpack(libraw_data_t *iprc, int *flip, GError **error)
sorted[i]->tformat == LIBRAW_INTERNAL_THUMBNAIL_KODAK_THUMB)
i++;
- if (i < count)
+ bool found = i != count;
+ if (found)
i = sorted[i] - iprc->thumbs_list.thumblist;
g_free(sorted);
- if (i == count) {
+ if (!found) {
set_error(error, "no suitable thumbnails found");
return FALSE;
}