We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebfb4ff commit c74efd1Copy full SHA for c74efd1
secure_boot_and_secure_firmware_upgrade_over_canfd/icsp_inhibit.X/main.c
@@ -33,6 +33,7 @@
33
#include <stdio.h>
34
#include <string.h>
35
#include <stdbool.h>
36
+#include <ctype.h>
37
38
#define USER_INPUT_BUFFER_SIZE 50
39
#define UNLOCK_COMMAND "LOCKDEVICE"
@@ -84,7 +85,7 @@ int main(void)
84
85
86
PrintWarning();
87
- while (1)
88
+ while(1)
89
{
90
char* userInput = ScanInput();
91
@@ -124,7 +125,7 @@ static char* ScanInput(void)
124
125
ResetPrompt();
126
}
127
- if((key != ENTER) && (userInputOffset < sizeof(userInput)))
128
+ if(isalnum(key) && (userInputOffset < sizeof(userInput)))
129
130
userInput[userInputOffset++] = key;
131
printf("%c", key);
0 commit comments