提交 be811e78 编写于 作者: L lion

fix the bug of content based read offset

上级 fd00e567
......@@ -147,7 +147,7 @@ XDB_PUBLIC(int) xdb_search(xdb_searcher_t *xdb, unsigned int ip, char *region_bu
XDB_PRIVATE(int) read(xdb_searcher_t *xdb, long offset, char *buffer, size_t length) {
// check the xdb content cache first
if (xdb->content_buff != NULL) {
memcpy(buffer, xdb->content_buff, length);
memcpy(buffer, xdb->content_buff + offset, length);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册