LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File blender-2.41-undefined_operation.patch of Package blender (Project graphics:rendering)

Index: source/blender/blenlib/intern/edgehash.c
===================================================================
--- source/blender/blenlib/intern/edgehash.c.orig
+++ source/blender/blenlib/intern/edgehash.c
@@ -76,8 +76,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;
@@ -114,7 +117,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)