summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw2220.pp
blob: 028c2316d0811e009bfe5ac857af607698c163e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ Source provided for Free Pascal Bug Report 2220 }
{ Submitted by "marco" on  2002-11-06 }
{ e-mail: marcov@freepascal.org }
{$H+}
{$ifdef fpc}{$MODE DELPHI}{$endif}
// NO OUTPUT, GDB SHOWS SIGSEGV IN DECR_REF

type bla=class
        freceivebuffer : array[0..4095] of char;
        flastresponse  : String;
        procedure themethod;
        end;

procedure bla.themethod;
        var i : longint;
        begin
         i:=12;
         flastresponse:=copy(freceivebuffer,1,I-1);
         writeln('point 1: ',flastresponse);
        end;

var x : bla;

begin
  x:=bla.create;
  x.freceivebuffer:='test string is wrong!';
  x.themethod;
  writeln('point 2');
end.