[gimp] app: align gimp_operation_shrink_process() with 2.8
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: align gimp_operation_shrink_process() with 2.8
- Date: Fri, 24 Jun 2016 01:20:27 +0000 (UTC)
commit 3232f38697bd59bcf390ef8f6f4802a64548ce0b
Author: Ell <ell_se yahoo com>
Date: Sat May 28 16:18:18 2016 +0000
app: align gimp_operation_shrink_process() with 2.8
radius_x/radius_y got swapped in a few spots, which lead to
segfaults and such when they weren't equal.
app/operations/gimpoperationshrink.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/app/operations/gimpoperationshrink.c b/app/operations/gimpoperationshrink.c
index 663ad05..1bd0964 100644
--- a/app/operations/gimpoperationshrink.c
+++ b/app/operations/gimpoperationshrink.c
@@ -293,7 +293,7 @@ gimp_operation_shrink_process (GeglOperation *operation,
if (self->edge_lock)
max[i] = buffer;
else
- max[i] = &buffer[(self->radius_x + 1) * (roi->width + self->radius_x)];
+ max[i] = &buffer[(self->radius_y + 1) * (roi->width + self->radius_x)];
}
else if (i < roi->width + self->radius_x)
{
@@ -302,9 +302,9 @@ gimp_operation_shrink_process (GeglOperation *operation,
else
{
if (self->edge_lock)
- max[i] = &buffer[(self->radius_x + 1) * (roi->width + self->radius_x - 1)];
+ max[i] = &buffer[(self->radius_y + 1) * (roi->width + self->radius_x - 1)];
else
- max[i] = &buffer[(self->radius_x + 1) * (roi->width + self->radius_x)];
+ max[i] = &buffer[(self->radius_y + 1) * (roi->width + self->radius_x)];
}
}
@@ -402,7 +402,7 @@ gimp_operation_shrink_process (GeglOperation *operation,
else
{
last_index = self->radius_x;
- last_max = max[x + self->radius_y][circ[self->radius_x]];
+ last_max = max[x + self->radius_x][circ[self->radius_x]];
for (i = self->radius_x - 1; i >= -self->radius_x; i--)
if (last_max > max[x + i][circ[i]])
@@ -431,7 +431,7 @@ gimp_operation_shrink_process (GeglOperation *operation,
g_free (buffer);
g_free (max);
- for (i = 0; i < self->radius_x + 1; i++)
+ for (i = 0; i < self->radius_y + 1; i++)
g_free (buf[i]);
g_free (buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]