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:

committed by
Jehan

parent
fcefb409e5
commit
11a43aebdf
@ -792,7 +792,7 @@ save_image (GFile *file,
|
|||||||
if (config->use_rle)
|
if (config->use_rle)
|
||||||
{
|
{
|
||||||
if (! print (output, error,
|
if (! print (output, error,
|
||||||
"%u] =\n",
|
"%u + 1] =\n",
|
||||||
(guint) (img_buffer_end - img_buffer)))
|
(guint) (img_buffer_end - img_buffer)))
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user