diff --git a/cwMath.cpp b/cwMath.cpp index 9f855d3..d5a737a 100644 --- a/cwMath.cpp +++ b/cwMath.cpp @@ -93,7 +93,7 @@ void cw::math::doubleToX80(double val, unsigned char rate[10]) bool cw::math::isPowerOfTwo( unsigned x ) { - return !( (x < 2) || (x & (x-1)) ); + return x==1 || (!( (x < 2) || (x & (x-1)) )); } unsigned cw::math::nextPowerOfTwo( unsigned val )