fix incorrect swap of source/dest var in decode list

This commit is contained in:
Rongsong Shen 2025-04-24 16:04:30 +08:00
parent c582108917
commit e1013e038b
4 changed files with 12 additions and 12 deletions

View file

@ -1033,7 +1033,7 @@ static void gen_call_list_decoder(capnp_ctx_t *ctx, struct str *func,
char *dtypename = n->name.str;
str_addf(func, "decode_%s_list(&(d->%s), &(d->%s), s->%s);\n", dtypename,
countvar, var2, var);
countvar, var, var2);
}
break;
}
@ -1192,7 +1192,7 @@ static void decode_member(capnp_ctx_t *ctx, struct str *func, struct field *f,
}
}
gen_call_list_decoder(ctx, func, &list_type, tab, var, buf, var2);
gen_call_list_decoder(ctx, func, &list_type, tab, var2, buf, var);
}
break;
default: