login

<     >

2018-01-14 13:11:47 (UTC-02:00)

Marcel Rodrigues <marcelgmr@gmail.com>

Fix size of last non-empty block in image data.

diff --git a/gifenc.c b/gifenc.c
index 3270f6b..c156f4e 100644
--- a/gifenc.c
+++ b/gifenc.c
@@ -155,7 +155,7 @@ end_key(ge_GIF *gif)
 {
     int byte_offset;
     byte_offset = gif->offset / 8;
-    gif->buffer[byte_offset++] = gif->partial & 0xFF;
+    gif->buffer[byte_offset] = gif->partial & 0xFF;
     write(gif->fd, (uint8_t []) {byte_offset}, 1);
     write(gif->fd, gif->buffer, byte_offset);
     write(gif->fd, "\0", 1);