# HG changeset patch
# User nemo
# Date 1246931624 0
# Node ID af8fc331174856f3095ef7808ce25466d6aa30c0
# Parent  79c9542c105807bf1b7a97ce9c8f41f161ed6b45
the -1 was a bad idea

diff -r 79c9542c1058 -r af8fc3311748 hedgewars/uLandGraphics.pas
--- a/hedgewars/uLandGraphics.pas	Tue Jul 07 01:51:46 2009 +0000
+++ b/hedgewars/uLandGraphics.pas	Tue Jul 07 01:53:44 2009 +0000
@@ -361,8 +361,7 @@
 bpp:= Image^.format^.BytesPerPixel;
 TryDo(bpp = 4, 'It should be 32 bpp sprite', true);
 // Check that sprite fits free space
-//p:= @(PByteArray(Image^.pixels)^[Image^.pitch * ( col * h + row * w )]);
-p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 - 1 ]);
+p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]);
 case bpp of
      4: for y:= 0 to Pred(h) do
             begin
@@ -391,7 +390,7 @@
    end;
 
 // Checked, now place
-p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 - 1 ]);
+p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]);
 case bpp of
      4: for y:= 0 to Pred(h) do
             begin