mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 05:34:01 +02:00
* fixes 4519, applied patch from Martin Schreiber to do so
git-svn-id: trunk@1811 -
This commit is contained in:
parent
bd30d32683
commit
b6a48cfa0a
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6374,6 +6374,7 @@ tests/webtbs/tw4477.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw4487.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4487.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4489.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4489.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4496.pp svneol=native#text/plain
|
tests/webtbs/tw4496.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw4519.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4529.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4529.pp -text svneol=unset#text/plain
|
||||||
tests/webtbs/tw4537.pp svneol=native#text/plain
|
tests/webtbs/tw4537.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw4540.pp -text svneol=unset#text/plain
|
tests/webtbs/tw4540.pp -text svneol=unset#text/plain
|
||||||
|
49
tests/webtbs/tw4519.pp
Normal file
49
tests/webtbs/tw4519.pp
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 4519 }
|
||||||
|
{ Submitted by "Martin Schreiber" on 2005-11-17 }
|
||||||
|
{ e-mail: }
|
||||||
|
program project1;
|
||||||
|
{$mode objfpc}{$h+}
|
||||||
|
uses
|
||||||
|
classes;
|
||||||
|
|
||||||
|
type
|
||||||
|
ttestcomp = class(tcomponent)
|
||||||
|
private
|
||||||
|
fstringvar: string;
|
||||||
|
procedure readstringvar(reader: treader);
|
||||||
|
procedure writestringvar(writer: twriter);
|
||||||
|
protected
|
||||||
|
procedure defineproperties(filer: tfiler); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ ttestcomp }
|
||||||
|
|
||||||
|
procedure ttestcomp.readstringvar(reader: treader);
|
||||||
|
begin
|
||||||
|
fstringvar:= reader.readstring;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ttestcomp.writestringvar(writer: twriter);
|
||||||
|
begin
|
||||||
|
writer.writestring(fstringvar);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure ttestcomp.defineproperties(filer: tfiler);
|
||||||
|
begin
|
||||||
|
filer.defineproperty('stringvar',@readstringvar,@writestringvar,true);
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
testcomp: ttestcomp;
|
||||||
|
stream1,stream2: tmemorystream;
|
||||||
|
|
||||||
|
begin
|
||||||
|
testcomp:= ttestcomp.create(nil);
|
||||||
|
stream1:= tmemorystream.create;
|
||||||
|
stream1.writecomponent(testcomp);
|
||||||
|
stream1.position:= 0;
|
||||||
|
stream2:= tmemorystream.create;
|
||||||
|
objectbinarytotext(stream1,stream2); //<- AV
|
||||||
|
stream1.free;
|
||||||
|
stream2.free;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user