This commit is contained in:
Anselme 2016-03-18 17:26:09 +01:00
parent 42b0403dc8
commit 917d16151b

View File

@ -121,7 +121,7 @@ bool RPGCharacter::fromString(QString str)
int nbItems = list[8].toInt(&ok);
if(!ok)
return false;
for(int i=0; i<nbItems; ++i)
for(int i=0; i<nbItems && i+9 < list.size; ++i)
inventory.push_back(list[9+i]);
return true;
}