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>
|
Sun Jan 25 18:41:17 PST 1998 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* app/about_dialog.c: Added a couple names here
|
* app/about_dialog.c: Added a couple names here
|
||||||
|
|
10
app/xcf.c
10
app/xcf.c
|
@ -1134,8 +1134,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
* matching values.
|
* matching values.
|
||||||
*/
|
*/
|
||||||
if ((length == 32768) ||
|
if ((length == 32768) ||
|
||||||
((length > 1) && (last != *data)) ||
|
((size - length) <= 0) ||
|
||||||
((size - length) == 0))
|
((length > 1) && (last != *data)))
|
||||||
{
|
{
|
||||||
count += length;
|
count += length;
|
||||||
if (length >= 128)
|
if (length >= 128)
|
||||||
|
@ -1163,8 +1163,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
* non-matching values.
|
* non-matching values.
|
||||||
*/
|
*/
|
||||||
if ((length == 32768) ||
|
if ((length == 32768) ||
|
||||||
((length > 0) && (last == *data)) ||
|
((size - length) == 0) ||
|
||||||
((size - length) == 0))
|
((length > 0) && (last == *data)))
|
||||||
{
|
{
|
||||||
count += length;
|
count += length;
|
||||||
state = 0;
|
state = 0;
|
||||||
|
@ -1203,10 +1203,12 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size > 0) {
|
||||||
length += 1;
|
length += 1;
|
||||||
last = *data;
|
last = *data;
|
||||||
data += bpp;
|
data += bpp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (count != (tile->ewidth * tile->eheight))
|
if (count != (tile->ewidth * tile->eheight))
|
||||||
g_print ("xcf: uh oh! xcf rle tile saving error: %d\n", count);
|
g_print ("xcf: uh oh! xcf rle tile saving error: %d\n", count);
|
||||||
|
|
|
@ -1134,8 +1134,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
* matching values.
|
* matching values.
|
||||||
*/
|
*/
|
||||||
if ((length == 32768) ||
|
if ((length == 32768) ||
|
||||||
((length > 1) && (last != *data)) ||
|
((size - length) <= 0) ||
|
||||||
((size - length) == 0))
|
((length > 1) && (last != *data)))
|
||||||
{
|
{
|
||||||
count += length;
|
count += length;
|
||||||
if (length >= 128)
|
if (length >= 128)
|
||||||
|
@ -1163,8 +1163,8 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
* non-matching values.
|
* non-matching values.
|
||||||
*/
|
*/
|
||||||
if ((length == 32768) ||
|
if ((length == 32768) ||
|
||||||
((length > 0) && (last == *data)) ||
|
((size - length) == 0) ||
|
||||||
((size - length) == 0))
|
((length > 0) && (last == *data)))
|
||||||
{
|
{
|
||||||
count += length;
|
count += length;
|
||||||
state = 0;
|
state = 0;
|
||||||
|
@ -1203,10 +1203,12 @@ xcf_save_tile_rle (XcfInfo *info,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (size > 0) {
|
||||||
length += 1;
|
length += 1;
|
||||||
last = *data;
|
last = *data;
|
||||||
data += bpp;
|
data += bpp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (count != (tile->ewidth * tile->eheight))
|
if (count != (tile->ewidth * tile->eheight))
|
||||||
g_print ("xcf: uh oh! xcf rle tile saving error: %d\n", count);
|
g_print ("xcf: uh oh! xcf rle tile saving error: %d\n", count);
|
||||||
|
|
Loading…
Reference in New Issue