diff options
Diffstat (limited to 'gui/patternpassword.cpp')
-rw-r--r-- | gui/patternpassword.cpp | 9 |
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) |