summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornailyk <nailyk_launchpad@nailyk.fr>2016-08-19 13:36:07 +0200
committerDees Troy <dees_troy@teamw.in>2016-08-22 17:46:04 +0200
commit61c7c5c67e5dde7eb3ec288247cceb9be29a47a2 (patch)
tree8124d39325fb325528e4bde227a2678ad27187f7
parentwait for cryptfs device node to come up (diff)
downloadandroid_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar.gz
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar.bz2
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar.lz
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar.xz
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.tar.zst
android_bootable_recovery-61c7c5c67e5dde7eb3ec288247cceb9be29a47a2.zip
-rw-r--r--gui/patternpassword.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/gui/patternpassword.cpp b/gui/patternpassword.cpp
index 90566e219..ab446b9f0 100644
--- a/gui/patternpassword.cpp
+++ b/gui/patternpassword.cpp
@@ -232,9 +232,12 @@ void GUIPatternPassword::Resize(size_t n) {
static int pow(int x, int i)
{
- while(i-- > 1)
- x *= x;
- return x;
+ int result = 1;
+ if (i<0)
+ return 0;
+ while(i-- > 0)
+ result *= x;
+ return result;
}
static bool IsInCircle(int x, int y, int ox, int oy, int r)