diff --git a/scard_darwin.go b/scard_darwin.go index e17d190..cb421e3 100644 --- a/scard_darwin.go +++ b/scard_darwin.go @@ -124,7 +124,7 @@ func scardTransmit(card uintptr, proto Protocol, cmd []byte, rsp []byte) (uint32 case ProtocolT0, ProtocolT1: sendpci.dwProtocol = C.uint32_t(proto) default: - panic("unknown protocol") + return 0, Error(C.SCARD_F_INTERNAL_ERROR) } sendpci.cbPciLength = C.sizeof_SCARD_IO_REQUEST