fix bugs for optlen setting in layer2_Getopt of iso14443a (Uwe Hermann)

git-svn-id: https://svn.gnumonks.org/trunk/librfid@2076 e0336214-984f-0b4b-a45f-81c69e1f0ede
This commit is contained in:
laforge 2008-02-08 15:06:05 +00:00
parent f8167ee283
commit 248a277403
1 changed files with 3 additions and 1 deletions

View File

@ -330,14 +330,16 @@ iso14443a_getopt(struct rfid_layer2_handle *handle, int optname,
switch (optname) {
case RFID_OPT_14443A_SAK:
*opt_u8 = h->sak;
optlen = sizeof(*opt_u8);
*optlen = sizeof(*opt_u8);
break;
case RFID_OPT_14443A_ATQA:
*atqa = h->atqa;
*optlen = sizeof(*atqa)
ret = 0;
break;
case RFID_OPT_14443A_WUPA:
*wupa = ((handle->flags & RFID_OPT_LAYER2_WUP) != 0);
*optlen = sizeof(*wupa);
ret = 0;
break;
};