mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Fix exception when there are spaces in INI-imported color settings
This commit is contained in:
parent
18e24a2007
commit
e9ab7c85c6
@ -41,8 +41,9 @@ namespace MWWorld
|
||||
unsigned int j=0;
|
||||
for(unsigned int i=0;i<sum.length();++i){
|
||||
if(sum[i]==',') j++;
|
||||
else ret[j]+=sum[i];
|
||||
else if (sum[i] != ' ') ret[j]+=sum[i];
|
||||
}
|
||||
|
||||
return Ogre::ColourValue(boost::lexical_cast<int>(ret[0])/255.f,boost::lexical_cast<int>(ret[1])/255.f,boost::lexical_cast<int>(ret[2])/255.f);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user