提交 4de5b84e 编写于 作者: S sdong

Fix a bug in IterKey

Summary: IterKey set buffer_size_ to a wrong initial value, causing it to always allocate values from heap instead of stack if the key size is smaller. Fix it.

Test Plan: make all check

Reviewers: haobo, ljin

Reviewed By: haobo

CC: igor, dhruba, yhchiang, leveldb

Differential Revision: https://reviews.facebook.net/D18279
上级 f9f8965e
......@@ -280,7 +280,7 @@ class IterKey {
delete[] key_;
}
key_ = space_;
buf_size_ = sizeof(buf_size_);
buf_size_ = sizeof(space_);
key_size_ = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册