Don't try to print XML if a corrupted asset is actually binary data

0.9.1.0-post-fixes
Melanie 2019-07-30 16:01:15 +01:00
parent 1c8508cfbd
commit 08b62c8daa
1 changed files with 9 additions and 0 deletions

View File

@ -3369,6 +3369,15 @@ namespace OpenSim.Framework
if (length > 2000)
xml = xml.Substring(0, 2000) + "...";
for (int i = 0 ; i < xml.Length ; i++)
{
if (xml[i] < 0x20)
{
xml = "Unprintable binary data";
break;
}
}
m_log.ErrorFormat("{0} Failed XML ({1} bytes) = {2}", message, length, xml);
}