pn53x-sam: fix truncated stdio return value

Problem reported by Coverity:
CID 1090318 (#1 of 1): Truncated stdio return value (CHAR_IO)
char_io: Assigning the return value of "getchar(void)" to char "input" truncates its value
This commit is contained in:
Philippe Teuwen 2013-09-22 02:38:17 +02:00
parent 679897d0a1
commit e2135dbaa5

View file

@ -114,7 +114,7 @@ main(int argc, const char *argv[])
printf(">> ");
// Take user's choice
char input = getchar();
int input = getchar();
printf("\n");
if ((input < '1') || (input > '3')) {
ERR("%s", "Invalid selection.");