From 7524c7729f820a510278a712e658b0865f83d079 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 22 Nov 2016 01:34:07 +0000 Subject: change asset description max size --- OpenSim/Framework/AssetBase.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 87fd04a..67239ec 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs @@ -51,7 +51,8 @@ namespace OpenSim.Framework private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly int MAX_ASSET_NAME = 64; - public static readonly int MAX_ASSET_DESC = 64; + public static readonly int MAX_ASSET_DESC = 127; + public static readonly int MAX_LMASSET_DESC = 255; /// /// Data of the Asset @@ -305,7 +306,18 @@ namespace OpenSim.Framework public string Description { get { return m_description; } - set { m_description = value; } + set + { + if(value.Length > AssetBase.MAX_LMASSET_DESC) + { + if(m_type == (sbyte) AssetType.Landmark) + m_description = value.Substring(0, AssetBase.MAX_LMASSET_DESC); + else + m_description = value.Substring(0, AssetBase.MAX_ASSET_DESC); + } + else + m_description = value; + } } public DateTime CreationDate -- cgit v1.1