diff --git a/bmp.c b/bmp.c index 76eb1f4..bfb6d8b 100644 --- a/bmp.c +++ b/bmp.c @@ -152,8 +152,8 @@ if (offset < pixelEnd && offset >= pixelStart) { // no expensive division done since modulo is a power of 2 if ((offset - pixelStart) % 2) { - writeByte(buf[1]); - writeByte(buf[0]); + writeByte(buf[3]); + writeByte(buf[2]); } }