From a143c72544b5147f6a8836ba19971fb29ef90fa1 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 4 Sep 2018 21:15:58 +0000 Subject: [PATCH] gobject-introspection: Fix compilation on Windows (issue #34219, patch by bartoc) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6630 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../gobject-introspection/girpascalwritertypes.pas | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/applications/gobject-introspection/girpascalwritertypes.pas b/applications/gobject-introspection/girpascalwritertypes.pas index f6e6bdb09..8f50e0304 100644 --- a/applications/gobject-introspection/girpascalwritertypes.pas +++ b/applications/gobject-introspection/girpascalwritertypes.pas @@ -269,17 +269,16 @@ implementation uses girpascalwriter, girCTypesMapping, girErrors, typinfo; function IndentText(const AText: String; Spaces: Integer = 0; LineEndingCount: Integer = 1): String; +var + i: Integer; begin if AText = '' then Exit(''); SetLength(Result, Spaces); FillChar(Result[1], Spaces, ' '); Result := Result+AText; - if LineEndingCount > 0 then - begin - SetLength(Result, Length(Result)+Length(LineEnding)*LineEndingCount); - FillChar(Result[Length(AText)+Spaces+1], LineEndingCount, LineEnding); - end; + for i := 1 to LineEndingCount do + Result := Result+LineEnding; end; function MakePointerTypesForType(const AName: String; PointerLevel: Integer): TStringList;