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

Commit

Permalink
Return when there is no readers
Browse files Browse the repository at this point in the history
WE2-359

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored and mrts committed Mar 5, 2021
1 parent 6e10c07 commit 820160a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Empty file modified scripts/clang-format.sh
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions src/listReaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ std::vector<SCARD_READERSTATE> getReaderStates(const SCARDCONTEXT ctx, const str
}});
}

if (readerStates.empty())
return {};

SCard(GetStatusChange, ctx, 0, readerStates.data(), DWORD(readerStates.size()));

return readerStates;
Expand Down

0 comments on commit 820160a

Please sign in to comment.