Skip to content

Commit

Permalink
fixed Delphi compilation
Browse files Browse the repository at this point in the history
- broken by #395
  • Loading branch information
Arnaud Bouchez committed May 5, 2021
1 parent bde05d1 commit f3c4413
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion SynDBODBC.pas
Expand Up @@ -1712,7 +1712,8 @@ procedure TODBCStatement.ExecutePrepared;
end;
ftDouble: begin
CValueType := SQL_C_DOUBLE;
if (fDBMS = dMSSQL) and (VInOut=paramIn) and (double(VInt64) > -1) and (double(VInt64) < 1) then begin
if (fDBMS = dMSSQL) and (VInOut=paramIn) and
(PDouble(@VInt64)^ > -1) and (PDouble(@VInt64)^ < 1) then begin
// prevent "Invalid character value for cast specification" error for numbers (-1; 1)
// for doubles outside this range SQL_C_DOUBLE must be used
ParameterType := SQL_NUMERIC;
Expand Down
4 changes: 2 additions & 2 deletions SynPdf.pas
Expand Up @@ -9949,7 +9949,7 @@ procedure TPdfEnum.HandleComment(Kind: TPdfGDIComment; P: PAnsiChar; Len: intege
var Text: RawUTF8;
W: integer;
Img: TPdfImage;
ImgName: string;
ImgName: PDFString;
ImgRect: TPdfRect;
begin
try
Expand All @@ -9975,7 +9975,7 @@ procedure TPdfEnum.HandleComment(Kind: TPdfGDIComment; P: PAnsiChar; Len: intege
pgcJpegDirect:
if Len>Sizeof(TRect) then begin
SetString(Text,P+SizeOf(TRect),Len-SizeOf(TRect));
ImgName := 'SynImgJpg'+crc32cUTF8ToHex(Text);
ImgName := 'SynImgJpg'+PDFString(crc32cUTF8ToHex(Text));
if Canvas.Doc.GetXObject(ImgName) = nil then
begin
Img := TPdfImage.CreateJpegDirect(Canvas.Doc,UTF8ToString(Text));
Expand Down
2 changes: 1 addition & 1 deletion SynopseCommit.inc
@@ -1 +1 @@
'1.18.6281'
'1.18.6282'

0 comments on commit f3c4413

Please sign in to comment.