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:
@@ -19,7 +19,7 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
|
|||||||
#if defined (_DEBUG)
|
#if defined (_DEBUG)
|
||||||
if (s.size() && s[0] == '#') return 0;
|
if (s.size() && s[0] == '#') return 0;
|
||||||
char buffer[4096];
|
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);
|
OutputDebugString(buffer);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user