File blender-2.41-undefined_operation.patch of Package blender

Index: source/blender/blenlib/intern/edgehash.c
===================================================================
--- source/blender/blenlib/intern/edgehash.c.orig
+++ source/blender/blenlib/intern/edgehash.c
@@ -79,8 +79,11 @@ EdgeHash *BLI_edgehash_new(void) {
 void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) {
 	unsigned int hash;
 	Entry *e= malloc(sizeof(*e));
-
-	if (v1<v0) v0 ^= v1 ^= v0 ^= v1;
+	if (v1<v0){
+		v0 ^= v1;
+		v1 ^= v0;
+		v0 ^= v1;
+	}
 	hash = EDGEHASH(v0,v1)%eh->nbuckets;
 
 	e->v0 = v0;
@@ -117,7 +120,11 @@ void** BLI_edgehash_lookup_p(EdgeHash *e
 	unsigned int hash;
 	Entry *e;
 
-	if (v1<v0) v0 ^= v1 ^= v0 ^= v1;
+	if (v1<v0){
+                v0 ^= v1;
+                v1 ^= v0;
+                v0 ^= v1;
+        }
 	hash = EDGEHASH(v0,v1)%eh->nbuckets;
 	for (e= eh->buckets[hash]; e; e= e->next)
 		if (v0==e->v0 && v1==e->v1)
openSUSE Build Service is sponsored by