From 098969cd0714029c141b1e31a40a72f1f00da231 Mon Sep 17 00:00:00 2001 From: Psyyringe Date: Sat, 12 Dec 2009 15:12:52 +0000 Subject: [PATCH] Psyringe - fixed segfault in debug mode; this caused the crash observed with r1467. Wagic's debug mode should now handle buggy _cards.dat files more gracefully by displaying the intended error message instead of crashing. --- projects/mtg/src/MTGDeck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index f29e31b9c..2b7f55505 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -19,7 +19,7 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){ #if defined (_DEBUG) if (s.size() && s[0] == '#') return 0; char buffer[4096]; - sprintf(buffer, "MTGDECK: Bad Line in %s/_cards.dat:\n %s\n", setlist[card->setId], s.c_str()); + sprintf(buffer, "MTGDECK: Bad Line in %s/_cards.dat:\n %s\n", setlist[card->setId].c_str(), s.c_str()); OutputDebugString(buffer); #endif return 0;