swap first, then write.
This commit is contained in:
parent
bec9db1ba3
commit
f15ed7b01a
4
external/cddl/osnet/dist/tools/ctf/cvt/ctf.c
vendored
4
external/cddl/osnet/dist/tools/ctf/cvt/ctf.c
vendored
@ -173,12 +173,12 @@ write_objects(iidesc_t *idp, ctf_buf_t *b)
|
||||
{
|
||||
ushort_t id = (idp ? idp->ii_dtype->t_id : 0);
|
||||
|
||||
ctf_buf_write(b, &id, sizeof (id));
|
||||
|
||||
if (target_requires_swap) {
|
||||
SWAP_16(id);
|
||||
}
|
||||
|
||||
ctf_buf_write(b, &id, sizeof (id));
|
||||
|
||||
debug(3, "Wrote object %s (%d)\n", (idp ? idp->ii_name : "(null)"), id);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user