Gui: replace pow() function

The old pow function doesn't work for other power than 2
- replace pow function by a squared one

Solve the TeamWin/Team-Win-Recovery-Project#646 issue.

Change-Id: Id177300d45a7b49ff983795288434d910eb35c2a
This commit is contained in:
nailyk
2016-08-22 17:46:04 +02:00
committed by Dees Troy
parent 3126a113e7
commit 61c7c5c67e
+6 -3
View File
@@ -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)