Browse Source

invert condition: always assign literal 1, substract only on special case

pull/771/head
Peter Amrehn 7 years ago
committed by Unknown
parent
commit
bb360ce356
  1. 6
      src/ImageSharp/Formats/Gif/LzwEncoder.cs

6
src/ImageSharp/Formats/Gif/LzwEncoder.cs

@ -309,10 +309,10 @@ namespace SixLabors.ImageSharp.Formats.Gif
// Non-empty slot
if (Unsafe.Add(ref hashTableRef, i) >= 0)
{
int disp = hsizeReg - i;
if (i == 0)
int disp = 1;
if (i != 0)
{
disp = 1;
disp = hsizeReg - i;
}
do

Loading…
Cancel
Save