diff options
-rw-r--r-- | systemunit.pas | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/systemunit.pas b/systemunit.pas index 9b054ca..a10229b 100644 --- a/systemunit.pas +++ b/systemunit.pas @@ -126,12 +126,13 @@ function shellSubst(s: string): string; var name: string; begin - result:=s; - while pos('${',result)>0 do begin - s:=erstesArgument(result,'${',false); - name:=erstesArgument(result,'}',false); - result:=s+getEnvironmentVariable(name)+result; + result:=''; + while pos('${',s)>0 do begin + result:=result+erstesArgument(s,'${',false); + name:=erstesArgument(s,'}',false); + result:=result+getEnvironmentVariable(name); end; + result:=result+s; end; function homeVerzeichnis: string; |