> /// Gets the maximum value for a N-bit unsigned integer. > -inline uint64_t maxUIntN(uint64_t N) { return UINT64_C(1) << N; } > +inline uint64_t maxUIntN(uint64_t N) { return (UINT64_C(1) << N) - 1; } This is still wrong unless N is guaranteed to be no greater than 63. John