add Culture.FormatProvider on all casts to LSLString on Vectors and Quaternions. This may need better checking

avinationmerge
UbitUmarov 2015-09-23 17:04:48 +01:00
parent 9e183cbd30
commit 592ba85b0a
1 changed files with 4 additions and 6 deletions

View File

@ -108,13 +108,13 @@ namespace OpenSim.Region.ScriptEngine.Shared
public static explicit operator LSLString(Vector3 vec)
{
string s = String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
string s = String.Format(Culture.FormatProvider, "<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
return new LSLString(s);
}
public static explicit operator string(Vector3 vec)
{
string s = String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
string s = String.Format(Culture.FormatProvider, "<{0:0.000000}, {1:0.000000}, {2:0.000000}>", vec.x, vec.y, vec.z);
return s;
}
@ -420,13 +420,13 @@ namespace OpenSim.Region.ScriptEngine.Shared
public static explicit operator string(Quaternion r)
{
string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
string s=String.Format(Culture.FormatProvider,"<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
return s;
}
public static explicit operator LSLString(Quaternion r)
{
string s=String.Format("<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
string s=String.Format(Culture.FormatProvider,"<{0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000}>", r.x, r.y, r.z, r.s);
return new LSLString(s);
}
@ -1534,8 +1534,6 @@ namespace OpenSim.Region.ScriptEngine.Shared
}
}
static public implicit operator String(LSLString s)
{
return s.m_string;