Change to Andreas Jochens patch for Debian bugs #358474/#359690
[synfig.git] / ETL / trunk / ETL / _surface.h
index ae50b1e..58a3efa 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "_pen.h"
 #include "_misc.h"
-//#include <algorithm>
+#include <algorithm>
 
 /* === M A C R O S ========================================================= */
 
@@ -274,8 +274,8 @@ public:
                }
                                
                //clip width against dest width
-               w = std::min(w,DEST_PEN.end_x()-DEST_PEN.x());
-               h = std::min(h,DEST_PEN.end_y()-DEST_PEN.y());
+               w = std::min((long)w,(long)(DEST_PEN.end_x()-DEST_PEN.x()));
+               h = std::min((long)h,(long)(DEST_PEN.end_y()-DEST_PEN.y()));
                
                //clip width against src width
                w = std::min(w,w_-x);