Issue #5415: compensate for null byte

When exporting a C source file with runtime length encoding, the
C-string's array size does not accomodate for the null byte. However,
GIMP accomodates for the NULL byte in it's NON-RLE export, suggesting
that this has been a mere oversight for RLE.

This can cause at the worst a compile-time error and at least a warning
from the compiler.

(cherry picked from commit 4d528f297f)
This commit is contained in:
Michael Bazzinotti
2020-07-16 08:45:20 -04:00
committed by Jehan
parent fcefb409e5
commit 11a43aebdf

View File

@ -792,7 +792,7 @@ save_image (GFile *file,
if (config->use_rle)
{
if (! print (output, error,
"%u] =\n",
"%u + 1] =\n",
(guint) (img_buffer_end - img_buffer)))
goto fail;
}