Browse Source

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

pull/771/head
Peter Amrehn 8 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 // Non-empty slot
if (Unsafe.Add(ref hashTableRef, i) >= 0) if (Unsafe.Add(ref hashTableRef, i) >= 0)
{ {
int disp = hsizeReg - i; int disp = 1;
if (i == 0) if (i != 0)
{ {
disp = 1; disp = hsizeReg - i;
} }
do do

Loading…
Cancel
Save