From dcffe6f0aae558244d4acfac265fcfe925bee605 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Tue, 12 Jun 2018 09:22:00 +0000 Subject: [PATCH] tvplanit: Fix compilation in Linux (issue #33852). git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6487 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/tvplanit/source/vpvcard.pas | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/tvplanit/source/vpvcard.pas b/components/tvplanit/source/vpvcard.pas index c9d083028..f4a47c057 100644 --- a/components/tvplanit/source/vpvcard.pas +++ b/components/tvplanit/source/vpvcard.pas @@ -279,7 +279,7 @@ function TVpVCardItem.UnEscape(AValueText: String): String; const BUFSIZE = 100; var - p: PChar; + p, q: PChar; idx: Integer; procedure AddChar(ch: Char); @@ -303,9 +303,12 @@ begin if p^ = '\' then begin inc(p); if p^ = 'n' then begin - AddChar(LineEnding[1]); - if Length(LineEnding) > 1 then - AddChar(LineEnding[2]); + q := PChar(LineEnding); + AddChar(Char(q^)); + if Length(LineEnding) > 1 then begin + inc(q); + AddChar(char(q^)); + end; end else AddChar(char(p^)); end else