initialized material texture index to -1.

This commit is contained in:
Marco Di Benedetto 2009-04-27 10:00:53 +00:00
parent 1236df14c5
commit 60041df5b4
1 changed files with 2 additions and 0 deletions

View File

@ -879,6 +879,7 @@ static bool LoadMask(const char * filename, int &mask)
materials.clear(); materials.clear();
Material currentMaterial; Material currentMaterial;
currentMaterial.index = -1;
bool first = true; bool first = true;
while (!stream.eof()) while (!stream.eof())
@ -897,6 +898,7 @@ static bool LoadMask(const char * filename, int &mask)
{ {
materials.push_back(currentMaterial); materials.push_back(currentMaterial);
currentMaterial = Material(); currentMaterial = Material();
currentMaterial.index = -1;
} }
else else
first = false; first = false;