Skip to content

Commit 7767a30

Browse files
committed
Fixed case: n=1
1 parent 0ea4987 commit 7767a30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/sdsl/dac_vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ dac_vector<t_b, t_rank>::dac_vector(const Container& c)
224224
m_level_pointer_and_rank[0] = n; // level 0 has n entries
225225

226226
uint8_t level_x_2 = 0;
227-
uint8_t max_level_x_2 = 0;
227+
uint8_t max_level_x_2 = 4;
228228
for (size_type i=0; i < n; ++i) {
229229
val=c[i];
230230
val >>= t_b; // shift value b bits to the right
@@ -301,7 +301,7 @@ dac_vector<t_b, t_rank>::dac_vector(int_vector_buffer<int_width>& v_buf)
301301
m_level_pointer_and_rank[0] = n; // level 0 has n entries
302302

303303
uint8_t level_x_2 = 0;
304-
uint8_t max_level_x_2 = 0;
304+
uint8_t max_level_x_2 = 4;
305305
for (size_type i=0; i < n; ++i) {
306306
val=v_buf[i];
307307
val >>= t_b; // shift value b bits to the right

0 commit comments

Comments
 (0)