Преглед изворни кода

* insure that env variable is only truncated if more than 255 chars after the equal sign

git-svn-id: trunk@6065 -
pierre пре 19 година
родитељ
комит
4bd7803e00
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      rtl/win/dos.pp

+ 3 - 1
rtl/win/dos.pp

@@ -806,7 +806,9 @@ begin
         i:=pos('=',s);
         if upcase(copy(s,1,i-1))=upcase(envvar) then
           begin
-             getenv:=copy(s,i+1,length(s)-i);
+             { getenv:=copy(s,i+1,length(s)-i);
+               this limits the size to 255-(i+1) }
+             getenv:=strpas(hp+i+1);
              break;
           end;
         { next string entry}