aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs20
1 files changed, 5 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index d34e9f4..10ddf14 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1825,23 +1825,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1825 // Create new asset 1825 // Create new asset
1826 AssetBase asset = new AssetBase(UUID.Random(), name, (sbyte)AssetType.Notecard, m_host.OwnerID.ToString()); 1826 AssetBase asset = new AssetBase(UUID.Random(), name, (sbyte)AssetType.Notecard, m_host.OwnerID.ToString());
1827 asset.Description = description; 1827 asset.Description = description;
1828 byte[] a;
1829 byte[] b;
1830 byte[] c;
1831 1828
1832 b = Util.UTF8.GetBytes(data); 1829 int textLength = data.Length;
1830 data
1831 = "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length "
1832 + textLength.ToString() + "\n" + data + "}\n";
1833 1833
1834 a = Util.UTF8.GetBytes( 1834 asset.Data = Util.UTF8.GetBytes(data);
1835 "Linden text version 2\n{\nLLEmbeddedItems version 1\n{\ncount 0\n}\nText length" + b.Length.ToString() + "\n");
1836
1837 c = Util.UTF8.GetBytes("}");
1838
1839 byte[] d = new byte[a.Length + b.Length + c.Length];
1840 Buffer.BlockCopy(a, 0, d, 0, a.Length);
1841 Buffer.BlockCopy(b, 0, d, a.Length, b.Length);
1842 Buffer.BlockCopy(c, 0, d, a.Length + b.Length, c.Length);
1843
1844 asset.Data = d;
1845 World.AssetService.Store(asset); 1835 World.AssetService.Store(asset);
1846 1836
1847 // Create Task Entry 1837 // Create Task Entry