Browse Source

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

af/merge-core
Peter Amrehn 8 years ago
committed by Unknown
parent
commit
1bb7af2144
  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