Ignore:
Timestamp:
Dec 6, 2023, 11:05:10 PM (11 months ago)
Author:
chronos
Message:
  • Fixed: Bitmap processing out of range error.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/MessgEx.pas

    r473 r480  
    264264            else
    265265              share := share * yR;
    266             Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0]
    267               + share * SrcPtr.Pixel^.B;
    268             Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1]
    269               + share * SrcPtr.Pixel^.G;
    270             Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2]
    271               + share * SrcPtr.Pixel^.R;
    272             Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy,
    273               3] + share;
     266            if (xDst + dx < ScaleToNative(Width)) and
     267            (yDst + dy < ScaleToNative(Height)) then begin
     268              Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0]
     269                + share * SrcPtr.Pixel^.B;
     270              Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1]
     271                + share * SrcPtr.Pixel^.G;
     272              Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2]
     273                + share * SrcPtr.Pixel^.R;
     274              Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy,
     275                3] + share;
     276            end;
    274277        end;
    275278        SrcPtr.NextPixel;
Note: See TracChangeset for help on using the changeset viewer.