Added byte swap for the PDR data bytes for -s.

This commit is contained in:
mark 2000-11-19 16:27:26 +00:00
parent 15524d31ef
commit ca89d16182
1 changed files with 2 additions and 3 deletions

View File

@ -1349,7 +1349,7 @@ void print_all_pdrs(pda_t *pda)
datap = (UINT16*)&(pda->rec[i]->data.end_of_pda);
nwords = hfa384x2host_16(pda->rec[i]->len) - 1;
for ( j = 0; j < nwords; j++) {
printf("%04x ", datap[j] );
printf("%04x ", hfa384x2host_16(datap[j]) );
if ( (j % 8) == 7 && j < nwords - 1 ) {
printf("\n ");
}
@ -1363,14 +1363,13 @@ void print_all_pdrs(pda_t *pda)
end = (((UINT8*)pda->rec[pda->nrec - 1]) - pda->buf + 6) / 2;
printf(" ");
for ( i = 0; i < end; i++ ) {
printf("%04x ", datap[i]);
printf("%04x ", hfa384x2host_16(datap[i]) );
if ( (i % 16) == 15 ) {
printf("\n ");
}
}
printf("\n");
}
}