diff -r 3b40c80c0fe3 -r 0c60ade27a0a hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Thu Mar 03 22:15:42 2011 +0300 +++ b/hedgewars/uUtils.pas Fri Mar 04 11:30:53 2011 +0300 @@ -185,9 +185,7 @@ function isPowerOf2(i: Longword): boolean; begin -if i = 0 then exit(true); -while not odd(i) do i:= i shr 1; -isPowerOf2:= (i = 1) +isPowerOf2:= (i and (i - 1)) = 0 end; function toPowerOf2(i: Longword): Longword;