Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-release-src > by-pkgid > 6407662e393f36a88e2ed8d6fdfe7c84 > files > 1

netpanzer-0.8.2-3mdv2010.0.src.rpm

diff -Naur --exclude '*.orig' --exclude '*.rej' netpanzer-0.8.2/src/Lib/2D/Surface.cpp netpanzer-0.8.2-fix-crash-x86_64/src/Lib/2D/Surface.cpp
--- netpanzer-0.8.2/src/Lib/2D/Surface.cpp	2007-06-23 09:25:48.000000000 +0200
+++ netpanzer-0.8.2-fix-crash-x86_64/src/Lib/2D/Surface.cpp	2009-04-13 17:37:49.000000000 +0200
@@ -404,9 +404,9 @@
     // CLIP TOP
     if (y < 0) {
         numRows += y;
-        sPtr    -= y * getPitch();
+        sPtr    -= y * (int)getPitch();
     } else {
-        dPtr += y * dest.getPitch();
+        dPtr += y * (int)dest.getPitch();
     }
 
     // CLIP BOTTOM
@@ -489,9 +489,9 @@
     // CLIP TOP
     if (y < 0) {
         numRows += y;
-        sPtr    -= y * getPitch();
+        sPtr    -= y * (int)getPitch();
     } else {
-        dPtr += y * dest.getPitch();
+        dPtr += y * (int)dest.getPitch();
     }
 
     // CLIP BOTTOM
@@ -578,9 +578,9 @@
     // CLIP TOP
     if (y < 0) {
         numRows += y;
-        sPtr    -= y * getPitch();
+        sPtr    -= y * (int)getPitch();
     } else {
-        dPtr += y * dest.getPitch();
+        dPtr += y * (int)dest.getPitch();
     }
 
     // CLIP BOTTOM
@@ -633,7 +633,7 @@
     orderCoords(x1, x2);
 
     unsigned length = x2 - x1;
-    PIX *ptr = mem + y * getPitch();
+    PIX *ptr = mem + y * (int)getPitch();
 
     // CLIP LEFT
     if (x1 < 0) {
@@ -675,7 +675,7 @@
     // CLIP BOTTOM
     if (y2 >= (int)getHeight()) y2 = getHeight()-1;
 
-    PIX	*ptr	= mem+y1*getPitch()+x;
+    PIX	*ptr	= mem+y1*(int)getPitch()+x;
 
     int	width	= y2 - y1;
 
@@ -741,7 +741,7 @@
     diff = (bounds.max - bounds.min);
 
     // Set memory to the top-left pixel of the rectangle.
-    PIX	*ptr = mem + bounds.min.y * getPitch() + bounds.min.x;
+    PIX	*ptr = mem + bounds.min.y * (int)getPitch() + bounds.min.x;
 
     for (int y = 0; y < diff.y; y++) {
         // Lay the horizontal strip.
@@ -1059,7 +1059,7 @@
     size_t pixelsPerRow = max.x - min.x;
     size_t numRows      = max.y - min.y;
 
-    PIX *dRow = mem + min.y*getPitch() + min.x;
+    PIX *dRow = mem + min.y*(int)getPitch() + min.x;
 
     for (size_t yCount = 0 ; yCount < numRows ; yCount++) {
         for(size_t x=0; x<pixelsPerRow; x++)
@@ -1119,7 +1119,7 @@
         numRows += min.y;
         srcY   -= min.y*ySrcDelta;
     }	else {
-        dRow += (min.y*getPitch());
+        dRow += (min.y*(int)getPitch());
     }
 
     // CLIP BOTTOM