mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 14:20:05 +02:00
* fix for allocarg
This commit is contained in:
parent
252fa84c62
commit
a16db1bcf6
@ -490,9 +490,11 @@ var
|
||||
sysreallocmem(argv,argvlen*sizeof(pointer));
|
||||
end;
|
||||
{ use realloc to reuse already existing memory }
|
||||
(* TH: the previous sentence applies to argv, not *)
|
||||
(* to argv[idx], which is never allocated before. *)
|
||||
{ always allocate, even if length is zero, since }
|
||||
{ the arg. is still present! }
|
||||
sysreallocmem(argv[idx],len+1);
|
||||
sysallocmem(argv[idx],len+1);
|
||||
end;
|
||||
|
||||
begin
|
||||
@ -505,7 +507,7 @@ begin
|
||||
Arglen:=0;
|
||||
repeat
|
||||
Inc(Arglen);
|
||||
until (pc[Arglen]=#0);
|
||||
until (pc[Arglen]^ = #0);
|
||||
allocarg(count,arglen);
|
||||
move(pc^,argv[count]^,arglen);
|
||||
|
||||
@ -769,7 +771,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.80 2005-03-01 21:59:14 hajny
|
||||
Revision 1.81 2005-03-27 20:40:54 hajny
|
||||
* fix for allocarg
|
||||
|
||||
Revision 1.80 2005/03/01 21:59:14 hajny
|
||||
* compilation fix
|
||||
|
||||
Revision 1.79 2005/02/14 17:13:31 peter
|
||||
|
Loading…
Reference in New Issue
Block a user