Skip to content

Conversation

@WangHao-nlp
Copy link

void lept_shrink_object(lept_value* v) {
assert(v != NULL && v->type == LEPT_OBJECT);
/* \todo */
if(v->u.o.capacity > v->u.o.size) {
v->u.o.capacity = v->u.o.size;
// 原来v->u.o.m = (lept_member *)realloc(v->u.o.m, v->u.o.capacity * sizeof(lept_value));
// 应该为
v->u.o.m = (lept_member *)realloc(v->u.o.m, v->u.o.capacity * sizeof(lept_member));
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants