mirror of https://github.com/GNOME/gimp.git
Fixed off by one error in xcf rle saving. Only shows up on some non-Linux
systems. -Yosh
This commit is contained in:
parent
928e811e2d
commit
b798753917
|
@ -1,3 +1,7 @@
|
|||
Tue Jan 27 00:18:28 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* app/xcf.c: fixes an off by one error in xcf_tile_save_rle()
|
||||
|
||||
Sun Jan 25 18:41:17 PST 1998 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* app/about_dialog.c: Added a couple names here
|
||||
|
|
16
app/xcf.c
16
app/xcf.c
|
@ -1134,8 +1134,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
* matching values.
|
||||
*/
|
||||
if ((length == 32768) ||
|
||||
((length > 1) && (last != *data)) ||
|
||||
((size - length) == 0))
|
||||
((size - length) <= 0) ||
|
||||
((length > 1) && (last != *data)))
|
||||
{
|
||||
count += length;
|
||||
if (length >= 128)
|
||||
|
@ -1163,8 +1163,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
* non-matching values.
|
||||
*/
|
||||
if ((length == 32768) ||
|
||||
((length > 0) && (last == *data)) ||
|
||||
((size - length) == 0))
|
||||
((size - length) == 0) ||
|
||||
((length > 0) && (last == *data)))
|
||||
{
|
||||
count += length;
|
||||
state = 0;
|
||||
|
@ -1203,9 +1203,11 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
break;
|
||||
}
|
||||
|
||||
length += 1;
|
||||
last = *data;
|
||||
data += bpp;
|
||||
if (size > 0) {
|
||||
length += 1;
|
||||
last = *data;
|
||||
data += bpp;
|
||||
}
|
||||
}
|
||||
|
||||
if (count != (tile->ewidth * tile->eheight))
|
||||
|
|
|
@ -1134,8 +1134,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
* matching values.
|
||||
*/
|
||||
if ((length == 32768) ||
|
||||
((length > 1) && (last != *data)) ||
|
||||
((size - length) == 0))
|
||||
((size - length) <= 0) ||
|
||||
((length > 1) && (last != *data)))
|
||||
{
|
||||
count += length;
|
||||
if (length >= 128)
|
||||
|
@ -1163,8 +1163,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
* non-matching values.
|
||||
*/
|
||||
if ((length == 32768) ||
|
||||
((length > 0) && (last == *data)) ||
|
||||
((size - length) == 0))
|
||||
((size - length) == 0) ||
|
||||
((length > 0) && (last == *data)))
|
||||
{
|
||||
count += length;
|
||||
state = 0;
|
||||
|
@ -1203,9 +1203,11 @@ xcf_save_tile_rle (XcfInfo *info,
|
|||
break;
|
||||
}
|
||||
|
||||
length += 1;
|
||||
last = *data;
|
||||
data += bpp;
|
||||
if (size > 0) {
|
||||
length += 1;
|
||||
last = *data;
|
||||
data += bpp;
|
||||
}
|
||||
}
|
||||
|
||||
if (count != (tile->ewidth * tile->eheight))
|
||||
|
|
Loading…
Reference in New Issue