* Fixed two failing OSD tests. OSDReal.AsString() now uses a slower but more accurate method to produce values that will always round-trip. A random "B" character was removed from the XmlSD DeserializeLLSDSample() test

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2508 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2009-03-19 18:15:49 +00:00
parent 46450da1ee
commit 26e0e50615
4 changed files with 5 additions and 4 deletions

View File

@@ -457,7 +457,8 @@ namespace OpenMetaverse.StructuredData
}
public override double AsReal() { return value; }
public override string AsString() { return value.ToString(Utils.EnUsCulture); }
// "r" ensures the value will correctly round-trip back through Double.TryParse
public override string AsString() { return value.ToString("r", Utils.EnUsCulture); }
public override byte[] AsBinary() { return Utils.DoubleToBytesBig(value); }
public override string ToString() { return AsString(); }
}