* return an empty string for paramstr(value>paramcount) (already correct

for other targets, mantis #11169)

git-svn-id: trunk@10704 -
This commit is contained in:
Jonas Maebe 2008-04-18 16:56:44 +00:00
parent bbd2d4ee1c
commit 57087da620
6 changed files with 23 additions and 6 deletions

1
.gitattributes vendored
View File

@ -8138,6 +8138,7 @@ tests/webtbs/tw11042.pp svneol=native#text/plain
tests/webtbs/tw11053.pp svneol=native#text/plain
tests/webtbs/tw1111.pp svneol=native#text/plain
tests/webtbs/tw11139.pp svneol=native#text/plain
tests/webtbs/tw11169.pp svneol=native#text/plain
tests/webtbs/tw1117.pp svneol=native#text/plain
tests/webtbs/tw1122.pp svneol=native#text/plain
tests/webtbs/tw1123.pp svneol=native#text/plain

View File

@ -272,11 +272,12 @@ begin
begin
paramstr := execpathstr;
end
else
else if (l < argc) then
begin
paramstr := '';
paramstr:=strpas(argv[l]);
end;
end
else
paramstr := '';
end;
Procedure Randomize;

View File

@ -103,7 +103,10 @@ function paramstr(l: longint) : string;
// paramstr := execpathstr;
// end
// else
paramstr:=strpas(argv[l]);
if (l < argc) then
paramstr:=strpas(argv[l])
else
paramstr:='';
end;
Procedure Randomize;

View File

@ -121,8 +121,10 @@ function paramstr(l: longint) : string;
begin
paramstr := execpathstr;
end
else if (l < argc) then
paramstr:=strpas(argv[l])
else
paramstr:=strpas(argv[l]);
paramstr:='';
end;
Procedure Randomize;

View File

@ -83,7 +83,10 @@ function paramstr(l: longint) : string;
// paramstr := execpathstr;
// end
// else
paramstr:=strpas(argv[l]);
if (l < argc) then
paramstr:=strpas(argv[l])
else
paramstr:='';
end;
Procedure Randomize;

7
tests/webtbs/tw11169.pp Normal file
View File

@ -0,0 +1,7 @@
var
l: longint;
begin
for l:=1 to 255 do
if paramstr(l) <> '' then
halt(1);
end.