Commit d541855a authored by Guolin Ke's avatar Guolin Ke
Browse files

fix #362 .

parent 04ede377
...@@ -238,7 +238,7 @@ public: ...@@ -238,7 +238,7 @@ public:
} }
if (rest) { if (rest) {
data_size_t idx = local_used_indices[num_data_ - 1]; data_size_t idx = local_used_indices[num_data_ - 1];
data_[num_data_ / 2 + 1] = (mem_data[idx >> 1] >> ((idx & 1) << 2)) & 0xf; data_[num_data_ >> 1] = (mem_data[idx >> 1] >> ((idx & 1) << 2)) & 0xf;
} }
} else { } else {
for (size_t i = 0; i < data_.size(); ++i) { for (size_t i = 0; i < data_.size(); ++i) {
...@@ -260,7 +260,7 @@ public: ...@@ -260,7 +260,7 @@ public:
} }
if (rest) { if (rest) {
data_size_t idx = used_indices[num_used_indices - 1]; data_size_t idx = used_indices[num_used_indices - 1];
data_[num_used_indices / 2 + 1] = (other_bin->data_[idx >> 1] >> ((idx & 1) << 2)) & 0xf; data_[num_used_indices >> 1] = (other_bin->data_[idx >> 1] >> ((idx & 1) << 2)) & 0xf;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment