fix the bug of content based read offset
This commit is contained in:
parent
34c410998f
commit
cb03009ac4
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue