Skip to content

Commit

Permalink
Fixed an impossible value for an undefined error in SetTemplate() met…
Browse files Browse the repository at this point in the history
…hod (thanks @JoshHawley for finding this one).
  • Loading branch information
Fasgort committed Dec 9, 2018
1 parent 61702b6 commit aa06925
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FPS_GT511C3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -962,12 +962,12 @@ uint8_t FPS_GT511C3::GetTemplate(uint16_t id, uint8_t data[])
// Parameter: the ID number to upload
// Parameter: Check for duplicate fingerprints already on fps
// Returns:
// -1 - Undefined error (shouldn't ever happen)
// 0 - Uploaded ok (no duplicate if enabled)
// 1 - ID duplicated
// 2 - Invalid position
// 3 - Communications error
// 4 - Device error
// 5 - Undefined error (shouldn't ever happen)
uint16_t FPS_GT511C3::SetTemplate(uint8_t tmplt[], uint16_t id, bool duplicateCheck)
{
#if FPS_DEBUG
Expand Down Expand Up @@ -1006,7 +1006,7 @@ uint16_t FPS_GT511C3::SetTemplate(uint8_t tmplt[], uint16_t id, bool duplicateCh
delete rp;
if (error == Response_Packet::ErrorCodes::NACK_COMM_ERR) return 3;
if (error == Response_Packet::ErrorCodes::NACK_DEV_ERR) return 4;
return -1; // Undefined error
return 5; // Undefined error
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/FPS_GT511C3.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ class FPS_GT511C3
// Parameter: the ID number to upload
// Parameter: Check for duplicate fingerprints already on fps
// Returns:
// -1 - Undefined error (shouldn't ever happen)
// 0 - Uploaded ok (no duplicate if enabled)
// 1 - ID duplicated
// 2 - Invalid position
// 3 - Communications error
// 4 - Device error
// 5 - Undefined error (shouldn't ever happen)
uint16_t SetTemplate(uint8_t tmplt[], uint16_t id, bool duplicateCheck);
#ifndef __GNUC__
#pragma endregion
Expand Down

0 comments on commit aa06925

Please sign in to comment.