mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-18 01:32:59 +08:00
改正del
This commit is contained in:
2
server.c
2
server.c
@@ -236,7 +236,7 @@ static int s4_del(THREADTIMER *timer) {
|
|||||||
while(has_next(fp, ch)) {
|
while(has_next(fp, ch)) {
|
||||||
SIMPLE_PB* spb = get_pb(fp);
|
SIMPLE_PB* spb = get_pb(fp);
|
||||||
DICT* d = (DICT*)spb->target;
|
DICT* d = (DICT*)spb->target;
|
||||||
if(!memcmp(timer->data, d->key, timer->numbytes)) {
|
if(!memcmp(timer->data, d->key, timer->numbytes+1)) {
|
||||||
uint32_t next = ftell(fp);
|
uint32_t next = ftell(fp);
|
||||||
uint32_t this = next - spb->real_len;
|
uint32_t this = next - spb->real_len;
|
||||||
fseek(fp, 0, SEEK_END);
|
fseek(fp, 0, SEEK_END);
|
||||||
|
|||||||
Reference in New Issue
Block a user