mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
When saving an oar/iar, don't attempt to write out the data byte array if it's empty
On Mono 2.6 (and probably before) this causes a non-obvious IOException
This commit is contained in:
@@ -208,7 +208,9 @@ namespace OpenSim.Framework.Serialization
|
||||
m_bw.Write(header);
|
||||
|
||||
// Write out data
|
||||
m_bw.Write(data);
|
||||
// An IOException occurs if we try to write out an empty array in Mono 2.6
|
||||
if (data.Length > 0)
|
||||
m_bw.Write(data);
|
||||
|
||||
if (data.Length % 512 != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user