No more sigsegv lalalalalalalala

This commit is contained in:
Nate Summers 1998-03-27 00:42:56 +00:00
parent 4f901c84da
commit 1d3eb2375d
4 changed files with 16 additions and 13 deletions

View File

@ -1,4 +1,7 @@
Thu Mar 26 16L32:05 MST 1998 Nathan Summers <rock@gimp.org>
Thu Mar 26 17:41:55 MST 1998 Nathan Summers <rock@gimp.org>
* app/iscissors.c: fixed the sigsegv if the layer is offset!
Thu Mar 26 16:32:05 MST 1998 Nathan Summers <rock@gimp.org>
* app/iscissors.c: fix a typo (i where a j should be)
Thu Mar 26 15:26:18 MST 1998 Nathan Summers <rock@gimp.org>

View File

@ -2599,7 +2599,7 @@ CR_convert (Iscissors *iscissors,
iscissors->mask->drawable.width,
iscissors->mask->drawable.height, TRUE);
for (i = 0; i < height; i++)
for (i = 0; i < height-(offy*SUPERSAMPLE); i++)
{
list = CR_scanlines[i];
@ -2609,7 +2609,7 @@ CR_convert (Iscissors *iscissors,
while (list)
{
x = (long) list->data;
x = (long) list->data + offx;
if ( x < 0 ) x = 0;
list = list->next;
@ -2620,7 +2620,7 @@ CR_convert (Iscissors *iscissors,
if (w+x > width) w = width - x;
if (!antialias)
channel_add_segment (iscissors->mask, x+offx, i+offy, w, 255);
channel_add_segment (iscissors->mask, x, i+offy, w, 255);
else
for (j = 0; j < w; j++)
vals[j + x] += 255;
@ -2640,7 +2640,7 @@ CR_convert (Iscissors *iscissors,
*b++ = (unsigned char) (val / SUPERSAMPLE2);
}
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width, buf);
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width-offx, buf);
}
g_slist_free (CR_scanlines[i]);

View File

@ -2599,7 +2599,7 @@ CR_convert (Iscissors *iscissors,
iscissors->mask->drawable.width,
iscissors->mask->drawable.height, TRUE);
for (i = 0; i < height; i++)
for (i = 0; i < height-(offy*SUPERSAMPLE); i++)
{
list = CR_scanlines[i];
@ -2609,7 +2609,7 @@ CR_convert (Iscissors *iscissors,
while (list)
{
x = (long) list->data;
x = (long) list->data + offx;
if ( x < 0 ) x = 0;
list = list->next;
@ -2620,7 +2620,7 @@ CR_convert (Iscissors *iscissors,
if (w+x > width) w = width - x;
if (!antialias)
channel_add_segment (iscissors->mask, x+offx, i+offy, w, 255);
channel_add_segment (iscissors->mask, x, i+offy, w, 255);
else
for (j = 0; j < w; j++)
vals[j + x] += 255;
@ -2640,7 +2640,7 @@ CR_convert (Iscissors *iscissors,
*b++ = (unsigned char) (val / SUPERSAMPLE2);
}
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width, buf);
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width-offx, buf);
}
g_slist_free (CR_scanlines[i]);

View File

@ -2599,7 +2599,7 @@ CR_convert (Iscissors *iscissors,
iscissors->mask->drawable.width,
iscissors->mask->drawable.height, TRUE);
for (i = 0; i < height; i++)
for (i = 0; i < height-(offy*SUPERSAMPLE); i++)
{
list = CR_scanlines[i];
@ -2609,7 +2609,7 @@ CR_convert (Iscissors *iscissors,
while (list)
{
x = (long) list->data;
x = (long) list->data + offx;
if ( x < 0 ) x = 0;
list = list->next;
@ -2620,7 +2620,7 @@ CR_convert (Iscissors *iscissors,
if (w+x > width) w = width - x;
if (!antialias)
channel_add_segment (iscissors->mask, x+offx, i+offy, w, 255);
channel_add_segment (iscissors->mask, x, i+offy, w, 255);
else
for (j = 0; j < w; j++)
vals[j + x] += 255;
@ -2640,7 +2640,7 @@ CR_convert (Iscissors *iscissors,
*b++ = (unsigned char) (val / SUPERSAMPLE2);
}
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width, buf);
pixel_region_set_row (&maskPR, offx/*0*/, (i / SUPERSAMPLE)+offy, iscissors->mask->drawable.width-offx, buf);
}
g_slist_free (CR_scanlines[i]);