[UBsan] Fixed int overflow
[libcds.git] / test / include / cds_test / fc_hevy_value.h
index 9208a1164d7a7b4c3e536fb25e8c794b7ad566a9..b17fd2a1ab1bb5d0d22109ee0614907762b9b4b4 100644 (file)
@@ -54,7 +54,7 @@ namespace fc_test {
             , nWriterNo(other.nWriterNo)
         {
             for(size_t i = 0; i < buffer_size; ++i)
-                pop_buff[i] =  static_cast<int>(std::sqrt(other.pop_buff[i]*rand()));
+                pop_buff[i] =  static_cast<int>(std::sqrt( static_cast<int>( pop_buff[i] * rand())));
         }
 
         void set_array(size_t new_size)