Browse Source

wrong length written (off by one)

af/merge-core
Johannes Bildstein 9 years ago
parent
commit
63e8f2d0c1
  1. 2
      src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs

2
src/ImageSharp/MetaData/Profiles/ICC/DataWriter/IccDataWriter.TagDataEntry.cs

@ -903,7 +903,7 @@ namespace ImageSharp
count += size = this.WriteAsciiString(value.ScriptCode, 67, true);
this.dataStream.Position -= size + 3;
count += this.WriteUInt16(value.ScriptCodeCode);
count += this.WriteByte((byte)(value.ScriptCode.Length > 66 ? 67 : value.ScriptCode.Length));
count += this.WriteByte((byte)(value.ScriptCode.Length > 66 ? 67 : value.ScriptCode.Length + 1));
this.dataStream.Position += size;
}

Loading…
Cancel
Save