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.

This commit is contained in:
Psyyringe
2009-12-12 15:12:52 +00:00
parent 74accec275
commit 098969cd07
+1 -1
View File
@@ -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;