Patch from Thoys, mantis #90, Comma's ( ',' ) found in some assets , they cant be converted to float they need to get points ( '.' ) to become convert able.
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1573 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -254,6 +254,15 @@ namespace libsecondlife
|
||||
fields = line.Split(' ');
|
||||
|
||||
int id = Int32.Parse(fields[0]);
|
||||
if (fields[1] == ",")
|
||||
{
|
||||
fields[1] = "0";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fields[1] = fields[1].Replace(',', '.');
|
||||
}
|
||||
float weight = float.Parse(fields[1], System.Globalization.NumberStyles.Float,
|
||||
Helpers.EnUsCulture.NumberFormat);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user