From fa39134a369c10aeb57519dd86b032bebcdbfbca Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Wed, 15 Sep 1999 18:12:14 +0000 Subject: [PATCH] use a temp var for xoring pointers -Yosh --- ChangeLog | 6 +++++- app/path_tool.c | 7 +++++-- app/tools/path_tool.c | 7 +++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ebb1edc65..fb009f17a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -1999-09-15 +Wed Sep 15 11:11:08 PDT 1999 Manish Singh + + * app/path_tool.c: use a temp var for xoring the pointers + +1999-09-15 Zachary Beane * plug-ins/script-fu/scripts/truchet.scm,coolmetal-logo.scm: Changed gimp-flip parameters to match new OrientationType enum diff --git a/app/path_tool.c b/app/path_tool.c index be20355790..3308d02b27 100644 --- a/app/path_tool.c +++ b/app/path_tool.c @@ -1241,7 +1241,8 @@ path_set_flags_helper (Path *path, PathCurve *curve, PathSegment *segment, gpoin { Path_set_flags_type *tmp = (Path_set_flags_type *) ptr; guint32 oldflags; - + guint tmp_uint; + if (segment) { oldflags = segment->flags; segment->flags &= ~(tmp->bits_clear); @@ -1264,7 +1265,9 @@ path_set_flags_helper (Path *path, PathCurve *curve, PathSegment *segment, gpoin /* Does this work on all (16|32|64)-bit Machines? */ - GPOINTER_TO_UINT(tmp->path_tool->single_active_segment) ^= GPOINTER_TO_UINT(segment); + tmp_uint = GPOINTER_TO_UINT(tmp->path_tool->single_active_segment); + tmp_uint ^= GPOINTER_TO_UINT(segment); + tmp->path_tool->single_active_segment = GUINT_TO_POINTER(tmp_uint); } } } diff --git a/app/tools/path_tool.c b/app/tools/path_tool.c index be20355790..3308d02b27 100644 --- a/app/tools/path_tool.c +++ b/app/tools/path_tool.c @@ -1241,7 +1241,8 @@ path_set_flags_helper (Path *path, PathCurve *curve, PathSegment *segment, gpoin { Path_set_flags_type *tmp = (Path_set_flags_type *) ptr; guint32 oldflags; - + guint tmp_uint; + if (segment) { oldflags = segment->flags; segment->flags &= ~(tmp->bits_clear); @@ -1264,7 +1265,9 @@ path_set_flags_helper (Path *path, PathCurve *curve, PathSegment *segment, gpoin /* Does this work on all (16|32|64)-bit Machines? */ - GPOINTER_TO_UINT(tmp->path_tool->single_active_segment) ^= GPOINTER_TO_UINT(segment); + tmp_uint = GPOINTER_TO_UINT(tmp->path_tool->single_active_segment); + tmp_uint ^= GPOINTER_TO_UINT(segment); + tmp->path_tool->single_active_segment = GUINT_TO_POINTER(tmp_uint); } } }