mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 20:26:43 +00:00 
			
		
		
		
	Fix exception when there are spaces in INI-imported color settings
This commit is contained in:
		
							parent
							
								
									18e24a2007
								
							
						
					
					
						commit
						e9ab7c85c6
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -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 a new issue