Commit c7011f18 authored by jaycox's avatar jaycox
Browse files

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.
parent a2d3aa60
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
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment