Fixed issue when calling function.
This commit is contained in:
parent
9195618bb9
commit
52cf8521bc
BIN
bin/KeyMaster
BIN
bin/KeyMaster
Binary file not shown.
@ -6,7 +6,7 @@ int prompPassword(char *password, const char *msg)
|
|||||||
{
|
{
|
||||||
struct termios oldt, newt;
|
struct termios oldt, newt;
|
||||||
|
|
||||||
printf(msg);
|
printf("%s", msg);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Disable echo
|
// Disable echo
|
||||||
|
|||||||
@ -92,7 +92,7 @@ int main(void)
|
|||||||
|
|
||||||
for (size_t i = 0; i < 4; i++)
|
for (size_t i = 0; i < 4; i++)
|
||||||
{
|
{
|
||||||
prompPassword(askedPass);
|
prompPassword(askedPass, "Please enter your unique password: ");
|
||||||
if (strcmp(password, askedPass) != 0)
|
if (strcmp(password, askedPass) != 0)
|
||||||
{
|
{
|
||||||
printf("Invalid password, tries left: %zu\n", 2 - i);
|
printf("Invalid password, tries left: %zu\n", 2 - i);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user