1. pygame
  2. Untitled project
  3. pygame

Commits

pygame  committed 436873b

unionall fix

  • Participants
  • Parent commits c7bfb39
  • Branches default

Comments (0)

Files changed (2)

File WHATSNEW

View file
 # BREAK = change breaks existing code
 # BUG	= fixed a bug that was (or could have been) crashing
 
+February 11, 2002
+        Rect unionall() and unionall_ip() fixed
+
 February 10, 2002
         pygame.init() not required for proper cleanup [BUG]
         CD.play() fixed for tracks above 0

File src/rect.c

View file
 	t = self->r.y;
 	r = self->r.x + self->r.w;
 	b = self->r.y + self->r.h;
-
 	size = PySequence_Length(list); /*warning, size could be -1 on error?*/
 	if(size < 1)
 		return PyRect_New4((short)l, (short)t, (short)(r-l), (short)(b-t));
 			Py_XDECREF(obj);
 			break;
 		}
-		t = min(t, argrect->x);
-		l = min(l, argrect->y);
-		r = max(b, argrect->x+argrect->w);
+		l = min(l, argrect->x);
+		t = min(t, argrect->y);
+		r = max(r, argrect->x+argrect->w);
 		b = max(b, argrect->y+argrect->h);
 		Py_DECREF(obj);
 	}
-
 	return PyRect_New4((short)l, (short)t, (short)(r-l), (short)(b-t));
 }
 
 			Py_XDECREF(obj);
 			break;
 		}
-		t = min(t, argrect->x);
-		l = min(l, argrect->y);
-		r = max(b, argrect->x+argrect->w);
+		l = min(l, argrect->x);
+		t = min(t, argrect->y);
+		r = max(r, argrect->x+argrect->w);
 		b = max(b, argrect->y+argrect->h);
 		Py_DECREF(obj);
 	}