File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,10 @@ object_generator::object_generator(const object_generator& copy) :
169169 m_key_stddev(copy.m_key_stddev),
170170 m_key_median(copy.m_key_median),
171171 m_value_buffer(NULL ),
172- m_random_fd(-1 )
173-
174- {
172+ m_random_fd(-1 ),
173+ m_value_buffer_size(0 ),
174+ m_value_buffer_mutation_pos(0 )
175+ {
175176 if (m_data_size_type == data_size_weighted &&
176177 m_data_size.size_list != NULL ) {
177178 m_data_size.size_list = new config_weight_list (*m_data_size.size_list );
@@ -423,7 +424,7 @@ data_object* object_generator::get_object(int iter)
423424 // modify object content in case of random data
424425 if (m_random_data) {
425426 m_value_buffer[m_value_buffer_mutation_pos++]++;
426- if (m_value_buffer_mutation_pos > m_value_buffer_size)
427+ if (m_value_buffer_mutation_pos >= m_value_buffer_size)
427428 m_value_buffer_mutation_pos = 0 ;
428429 }
429430
You can’t perform that action at this time.
0 commit comments