Commits

Kevin A. Archie  committed 1e18f1d

fixed bug in applying modifications

  • Participants
  • Parent commits 9370c12

Comments (0)

Files changed (1)

File ecat-io/src/main/java/org/nrg/ecat/MatrixData.java

 		for (final Iterator i = modifications.iterator(); i.hasNext(); i.remove()) {
 			final HeaderModification mod = (HeaderModification)i.next();
 			final int offset = mod.getOffset();
+			assert offset >= hpos;
 			if (offset > hpos) {
 				IOUtils.copy(out, in, offset - hpos);
+				hpos = offset;
 			}
-			assert offset == hpos;
 			hpos += mod.modify(out, in);
 		}