crash fix

This commit is contained in:
Max-Wilhelm Bruker 2009-09-28 11:22:33 +02:00
parent adb4edc256
commit bf1ae3a36b
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ Card *PlayerZone::getCard(int id, bool remove, int *position)
}
return NULL;
} else {
if (id >= cards.size())
if ((id >= cards.size()) || (id < 0))
return NULL;
Card *tmp = cards[id];
if (remove)

View file

@ -19,4 +19,4 @@
***************************************************************************/
static const int PROTOCOL_VERSION = 1;
static const char *VERSION_STRING = "Servatrice 0.20090925";
static const char *VERSION_STRING = "Servatrice 0.20090928";