diff --git a/scripts/clang-format.sh b/scripts/clang-format.sh old mode 100644 new mode 100755 diff --git a/src/listReaders.cpp b/src/listReaders.cpp index 2be9138..013759f 100644 --- a/src/listReaders.cpp +++ b/src/listReaders.cpp @@ -75,6 +75,9 @@ std::vector getReaderStates(const SCARDCONTEXT ctx, const str }}); } + if (readerStates.empty()) + return {}; + SCard(GetStatusChange, ctx, 0, readerStates.data(), DWORD(readerStates.size())); return readerStates;