Skip to content

Commit

Permalink
Handle result from flecs_meta_serialize_type
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroErrors committed Jan 3, 2024
1 parent 1f7ba4a commit faf482a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/addons/meta/serialized.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ int flecs_meta_serialize_array_component(
return -1; /* Should never happen, will trigger internal error */
}

flecs_meta_serialize_type(world, ptr->type, 0, ops);
if (flecs_meta_serialize_type(world, ptr->type, 0, ops) != 0) {
return -1;
}

ecs_meta_type_op_t *first = ecs_vec_first(ops);
first->count = ptr->count;
Expand Down Expand Up @@ -194,8 +196,9 @@ int flecs_meta_serialize_struct(
ecs_member_t *member = &members[i];

cur = ecs_vec_count(ops);
flecs_meta_serialize_type(world,
member->type, offset + member->offset, ops);
if (flecs_meta_serialize_type(world, member->type, offset + member->offset, ops) != 0) {
continue;
}

op = flecs_meta_ops_get(ops, cur);
if (!op->type) {
Expand Down

0 comments on commit faf482a

Please sign in to comment.