fixed bogus computation of the maximum compressed size of a tile in

* app/xcf.c: fixed bogus computation of the maximum compressed
 	size of a tile in xcf_load_level and xcf_save_level.
This commit is contained in:
jaycox
1999-05-17 10:06:04 +00:00
parent a2d3aa603d
commit c7011f18b3
3 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
1999-05-17 Jay Cox <jaycox@earthlink.net>
* app/xcf.c: fixed bogus computation of the maximum compressed
size of a tile in xcf_load_level and xcf_save_level.
1999-05-16 Scott Goehring <scott@poverty.bloomington.in.us>
* plug-ins/displace/displace.c (run): Fixed a dumb typo reported

View File

@ -1459,7 +1459,7 @@ xcf_save_level (XcfInfo *info,
/* allocate a temporary buffer to store the rle data before it is
written to disk */
rlebuf = g_malloc(level->width*level->height*level->bpp * 1.5);
rlebuf = g_malloc(TILE_WIDTH*TILE_HEIGHT*level->bpp * 1.5);
if (level->tiles)
{
@ -2466,8 +2466,8 @@ xcf_load_level (XcfInfo *info,
/* if the offset is 0 then we need to read in the maximum possible
allowing for negative compression */
if (offset2 == 0)
offset2 = offset + width*height*4*1.5; /* 1.5 is probably more
than we need to allow */
offset2 = offset + TILE_WIDTH*TILE_WIDTH*4*1.5; /* 1.5 is probably more
than we need to allow */
/* seek to the tile offset */
xcf_seek_pos (info, offset);

View File

@ -1459,7 +1459,7 @@ xcf_save_level (XcfInfo *info,
/* allocate a temporary buffer to store the rle data before it is
written to disk */
rlebuf = g_malloc(level->width*level->height*level->bpp * 1.5);
rlebuf = g_malloc(TILE_WIDTH*TILE_HEIGHT*level->bpp * 1.5);
if (level->tiles)
{
@ -2466,8 +2466,8 @@ xcf_load_level (XcfInfo *info,
/* if the offset is 0 then we need to read in the maximum possible
allowing for negative compression */
if (offset2 == 0)
offset2 = offset + width*height*4*1.5; /* 1.5 is probably more
than we need to allow */
offset2 = offset + TILE_WIDTH*TILE_WIDTH*4*1.5; /* 1.5 is probably more
than we need to allow */
/* seek to the tile offset */
xcf_seek_pos (info, offset);