diff --git a/source/main.c b/source/main.c index 8f01535..e250772 100644 --- a/source/main.c +++ b/source/main.c @@ -123,7 +123,7 @@ void main(void) } u32 pinMode = MULTICONFIG(PIN); - bool pinExists = pinMode != 0 && verifyPin(pinMode, true); + bool pinExists = pinMode != 0 && verifyPin(pinMode); //If no configuration file exists or SELECT is held, load configuration menu bool shouldLoadConfigMenu = needConfig == CREATE_CONFIGURATION || ((pressed & (BUTTON_SELECT | BUTTON_L1)) == BUTTON_SELECT); diff --git a/source/pin.c b/source/pin.c index 935343c..b7d0246 100644 --- a/source/pin.c +++ b/source/pin.c @@ -122,7 +122,7 @@ void newPin(bool allowSkipping, u32 pinMode) error("Error writing the PIN file"); } -bool verifyPin(u32 pinMode, bool hidePin) +bool verifyPin(u32 pinMode) { PinData pin; @@ -172,7 +172,7 @@ bool verifyPin(u32 pinMode, bool hidePin) if(reset) { for(u32 i = 0; i < cnt; i++) - drawCharacter((char)enteredPassword[i], true, 10 + (16 + 2 * i) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_BLACK); + drawCharacter('*', true, 10 + (16 + 2 * i) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_BLACK); cnt = 0; reset = false; @@ -199,9 +199,9 @@ bool verifyPin(u32 pinMode, bool hidePin) //Add character to password enteredPassword[cnt] = (u8)pinKeyToLetter(pressed); + //Visualize character on screen - char display = hidePin ? '*' : (char)enteredPassword[cnt]; - drawCharacter(display, true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE); + drawCharacter('*', true, 10 + (16 + 2 * cnt) * SPACING_X, 10 + 3 * SPACING_Y, COLOR_WHITE); if(++cnt < lengthBlock[0]) continue; diff --git a/source/pin.h b/source/pin.h index a6c18fc..c781508 100644 --- a/source/pin.h +++ b/source/pin.h @@ -33,4 +33,4 @@ #define PIN_VERSIONMINOR 3 void newPin(bool allowSkipping, u32 pinMode); -bool verifyPin(u32 pinMode, bool hidePin); \ No newline at end of file +bool verifyPin(u32 pinMode); \ No newline at end of file