From 3ad65b95898155fc0e26c8ba69d73234ac82b7d0 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Mon, 4 May 2020 16:53:29 +0200 Subject: [PATCH] vfs5011: Prevent too small images We need more than 1 line for assembling, but in general, we should have a reasonable amount of lines. So use the width in the hope we'll get an image that is about square at least. Closes: #135 --- libfprint/drivers/vfs5011.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfprint/drivers/vfs5011.c b/libfprint/drivers/vfs5011.c index 4af3207..ffc0680 100644 --- a/libfprint/drivers/vfs5011.c +++ b/libfprint/drivers/vfs5011.c @@ -381,9 +381,8 @@ submit_image (FpiSsm *ssm, { FpImage *img; - if (self->lines_recorded == 0) + if (self->lines_recorded < VFS5011_IMAGE_WIDTH) { - /* == FP_ENROLL_RETRY_TOO_SHORT */ fpi_image_device_retry_scan (dev, FP_DEVICE_RETRY_TOO_SHORT); return; }