Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61c7c5c6 authored by nailyk's avatar nailyk Committed by Dees Troy
Browse files

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
parent 3126a113
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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)