Skip to content
Permalink
Browse files

SynGdiPlus: read from the current position in TSynPicture.LoadFromStr…

…eam()

Just like TGraphic and its descendents.
  • Loading branch information
dhewg committed Jan 14, 2020
1 parent bedc07a commit 43d4d246857ed2765856f1fc2598b038beebb116
Showing with 1 addition and 2 deletions.
  1. +1 −2 SynGdiPlus.pas
@@ -1654,10 +1654,9 @@ procedure TSynPicture.LoadFromStream(Stream: TStream);
Clear;
if not Gdip.Exists or (Stream=nil) then
exit;
fGlobalLen := Stream.Size;
fGlobalLen := Stream.Size - Stream.Position;
if fGlobalLen=0 then
exit;
Stream.Seek(0,soFromBeginning);
fGlobal := GlobalAlloc(GMEM_MOVEABLE,fGlobalLen);
if fGlobal=0 then
exit;

0 comments on commit 43d4d24

Please sign in to comment.
You can’t perform that action at this time.