aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pulse.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/pulse.cc b/pulse.cc
index edd0449..c423c72 100644
--- a/pulse.cc
+++ b/pulse.cc
@@ -150,6 +150,9 @@ Card* PulseClient::GetCard(const uint32_t& index) {
}
Card* PulseClient::GetCard(const string& name) {
+ long val;
+ if (xstrtol(name.c_str(), &val) == 0) return GetCard(val);
+
for (Card& card : cards_) {
if (card.name_ == name) return &card;
}