summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r--crawl-ref/source/debug.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 7e2ba2701b..6deb102853 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -2357,16 +2357,24 @@ void debug_card()
msg::streams(MSGCH_PROMPT) << "Which card? " << std::endl;
char buf[80];
if (cancelable_get_line(buf, sizeof buf))
+ {
+ mpr("Unknown card.");
return;
+ }
+
+ bool found_card = false;
for ( int i = 0; i < NUM_CARDS; ++i )
{
const card_type c = static_cast<card_type>(i);
if ( strstr(card_name(c), buf) != NULL )
{
card_effect(c, DECK_RARITY_LEGENDARY);
+ found_card = true;
break;
}
}
+ if (!found_card)
+ mpr("Unknown card.");
}
static void debug_uptick_xl(int newxl)