+ Fix of invalid pointer bug in unescape, from U. Maeder

This commit is contained in:
michael 2002-10-18 05:43:53 +00:00
parent e240d78c2e
commit 2d7dd81998

View File

@ -332,14 +332,17 @@ begin
halt;
end;
sptr :=0;
for cnt := 0 to qslen do
{ for cnt := 0 to qslen do +++++ use while instead of for }
cnt:=0;
while cnt<=qslen do
begin
case querystring[cnt] of
'+': qunescaped[sptr] := ' ';
'%': begin
qunescaped[sptr] :=
hexconv(querystring[cnt+1], querystring[cnt+2]);
inc(cnt,2);
inc(cnt,2); { <--- not allowed in for loops in pascal }
end;
else
qunescaped[sptr] := querystring[cnt];
@ -347,6 +350,7 @@ begin
inc(sptr);
{ skelet fix }
qunescaped[sptr]:=#0;
inc(cnt); { <-- don't forget to increment }
end;
UnEscape:=qunescaped;
end;
@ -482,7 +486,10 @@ end.
{
HISTORY
$Log$
Revision 1.7 2002-10-10 05:48:20 michael
Revision 1.8 2002-10-18 05:43:53 michael
+ Fix of invalid pointer bug in unescape, from U. Maeder
Revision 1.7 2002/10/10 05:48:20 michael
Added http_remote and fixed determining of input method. Fix courtesy of Antal <antal@carmelcomputer.com>
Revision 1.6 2002/09/12 16:24:59 michael