mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 02:45:58 +02:00
* ParamStr (0) fixed
This commit is contained in:
parent
a7b837f4ff
commit
8e0b10a0da
@ -209,12 +209,27 @@ function paramstr(l:longint):string;
|
|||||||
var p:^Pchar;
|
var p:^Pchar;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (l>=0) and (l<=paramcount) then
|
if L = 0 then
|
||||||
begin
|
begin
|
||||||
p:=args;
|
GetMem (P, 260);
|
||||||
paramstr:=strpas(p[l]);
|
{$ASMMODE INTEL}
|
||||||
|
asm
|
||||||
|
mov edx, P
|
||||||
|
mov ecx, 260
|
||||||
|
mov eax, 7F33h
|
||||||
|
call syscall
|
||||||
|
end;
|
||||||
|
{$ASMMODE ATT}
|
||||||
|
ParamStr := StrPas (PChar (P));
|
||||||
|
FreeMem (P, 260);
|
||||||
end
|
end
|
||||||
else paramstr:='';
|
else
|
||||||
|
if (l>0) and (l<=paramcount) then
|
||||||
|
begin
|
||||||
|
p:=args;
|
||||||
|
paramstr:=strpas(p[l]);
|
||||||
|
end
|
||||||
|
else paramstr:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$asmmode att}
|
{$asmmode att}
|
||||||
@ -881,7 +896,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2000-11-11 23:12:39 hajny
|
Revision 1.4 2000-11-13 21:23:38 hajny
|
||||||
|
* ParamStr (0) fixed
|
||||||
|
|
||||||
|
Revision 1.3 2000/11/11 23:12:39 hajny
|
||||||
* stackcheck alias corrected
|
* stackcheck alias corrected
|
||||||
|
|
||||||
Revision 1.2 2000/10/15 20:43:10 hajny
|
Revision 1.2 2000/10/15 20:43:10 hajny
|
||||||
|
Loading…
Reference in New Issue
Block a user