Fixed some offsets while parsing the pda and fixed an output format.

This commit is contained in:
mark 2000-01-25 23:17:23 +00:00
parent bce8d4a134
commit 6c87551b66
1 changed files with 4 additions and 3 deletions

View File

@ -427,7 +427,7 @@ void print_all_pdrs(void)
"---------------------------------------------------\n");
/* 000 0x0000 000 0000 0000 0000 0000... */
for ( i = 0; i < ncardpdrec; i++) {
printf("%03d 0x%04x %3d", i,
printf("%03d 0x%04x %03d ", i,
cardpdrec[i].code,
cardpdrec[i].len);
for ( j = 0; j < cardpdrec[i].len; j++) {
@ -508,9 +508,10 @@ int makepdrlist( UINT8 *pda, hfa384x_pdrec_t *pdrec, UINT *nrec)
while ( hfa384x2host_16(pda16[curroff + 1]) != HFA384x_PDR_END_OF_PDA){
pdrec[*nrec].len = hfa384x2host_16(pda16[curroff]);
pdrec[*nrec].code = hfa384x2host_16(pda16[curroff+1]);
pdrec[*nrec].data = (union pdr*)(pda + (curroff*2) + 2);
pdrec[*nrec].data = (union pdr*)
(pda + (curroff*2) + (2*sizeof(UINT16)));
(*nrec)++;
curroff += hfa384x2host_16(pda16[curroff]);
curroff += hfa384x2host_16(pda16[curroff]) + 1;
}
return result;
}