Skip to content
This repository was archived by the owner on May 16, 2024. It is now read-only.

Commit 820160a

Browse files
metsmamrts
authored andcommitted
Return when there is no readers
WE2-359 Signed-off-by: Raul Metsma <[email protected]>
1 parent 6e10c07 commit 820160a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

scripts/clang-format.sh

100644100755
File mode changed.

src/listReaders.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ std::vector<SCARD_READERSTATE> getReaderStates(const SCARDCONTEXT ctx, const str
7575
}});
7676
}
7777

78+
if (readerStates.empty())
79+
return {};
80+
7881
SCard(GetStatusChange, ctx, 0, readerStates.data(), DWORD(readerStates.size()));
7982

8083
return readerStates;

0 commit comments

Comments
 (0)