device: Use FP_FINGER_IS_VALID to check finger number

This commit is contained in:
Marco Trevisan (Treviño)
2019-12-19 14:29:04 +01:00
parent 707ed01059
commit a520896325

View File

@ -295,7 +295,7 @@ finger_num_to_name (int finger_num)
{ {
if (finger_num == -1) if (finger_num == -1)
return "any"; return "any";
if (finger_num < FP_FINGER_FIRST || finger_num > FP_FINGER_LAST) if (!FP_FINGER_IS_VALID (finger_num))
return NULL; return NULL;
return fingers[finger_num]; return fingers[finger_num];
} }