pngdelphi icon indicating copy to clipboard operation
pngdelphi copied to clipboard

Delphi XE3: Error on assignment with a pointer

Open rhengles opened this issue 4 years ago • 0 comments

When running a project using this file in Delphi XE3, I'm getting an error:

https://github.com/JackTrapper/pngdelphi/blob/master/PNGImage.pas#L2773

    {Copy this row}
    Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
    Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
    Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src)    )^]; inc(Dest);
    // Error on Byte(Dest^) on the left side of assignment
    // [dcc32 Error] pngimage.pas(2769): E2064 Left side cannot be assigned to

How can I make this compatible with Delphi XE3 ?

rhengles avatar Jun 25 '20 22:06 rhengles