Merge pull request #4586 from Awingu/cbytes-fix
Fix inconsistent cchReaderLen value between WinScard and pcsc-lite.
This commit is contained in:
commit
d5f9da2b3c
@ -1142,7 +1142,13 @@ static LONG smartcard_StatusW_Call(SMARTCARD_DEVICE* smartcard, SMARTCARD_OPERAT
|
||||
if (!call->fmszReaderNamesIsNULL)
|
||||
ret.mszReaderNames = (BYTE*) mszReaderNames;
|
||||
|
||||
// WinScard returns the number of CHARACTERS whereas pcsc-lite returns the
|
||||
// number of BYTES.
|
||||
#ifdef _WIN32
|
||||
ret.cBytes = cchReaderLen * 2;
|
||||
#else
|
||||
ret.cBytes = cchReaderLen;
|
||||
#endif
|
||||
|
||||
if (call->cbAtrLen)
|
||||
ret.cbAtrLen = cbAtrLen;
|
||||
|
Loading…
x
Reference in New Issue
Block a user