Changeset 9388
- Timestamp:
- 04/22/13 15:26:35 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Persistence/3.3/Default/Xml/Compact/NumberArray2XmlSerializerBase.cs
r7259 r9388 23 23 using System.Collections; 24 24 using System.Collections.Generic; 25 using System.Linq; 25 26 using System.Text; 26 27 using HeuristicLab.Persistence.Auxiliary; … … 56 57 lowerBounds[i] = a.GetLowerBound(i); 57 58 } 59 if (lengths.Any(l => l == 0)) 60 return new XmlString(sb.ToString()); 58 61 int[] positions = (int[])lowerBounds.Clone(); 59 62 while (positions[a.Rank - 1] < lengths[a.Rank - 1] + lowerBounds[a.Rank - 1]) { … … 102 105 } 103 106 } 104 if (positions[rank - 1] != lowerBounds[rank - 1] + lengths[rank - 1] )107 if (positions[rank - 1] != lowerBounds[rank - 1] + lengths[rank - 1] && lengths.All(l => l != 0)) 105 108 throw new PersistenceException("Insufficient number of elements while trying to fill number array."); 106 109 return (T)(object)a;
Note: See TracChangeset
for help on using the changeset viewer.