Ticket #5767: random.patch

File random.patch, 559 bytes (added by Synge Todo <wistaria@…>, 11 years ago)
  • boost/random/mersenne_twister.hpp

     
    175175
    176176        // fix up the state if it's all zeroes.
    177177        if((x[0] & (~static_cast<UIntType>(0) << r)) == 0) {
    178             for(std::size_t j = 1; i < n; ++j) {
     178            for(std::size_t j = 1; j < n; ++j) {
    179179                if(x[j] != 0) return;
    180180            }
    181181            x[0] = static_cast<UIntType>(1) << (w-1);