Ver código fonte

m68k-amiga: while trying to construct ParamStr(0), if the directory is empty, do not prepend the binary name with '/'

git-svn-id: trunk@44562 -
Károly Balogh 5 anos atrás
pai
commit
433e40fe71
1 arquivos alterados com 8 adições e 3 exclusões
  1. 8 3
      rtl/amicommon/paramhandling.inc

+ 8 - 3
rtl/amicommon/paramhandling.inc

@@ -240,10 +240,15 @@ begin
     if l = 0 then
     if l = 0 then
     begin
     begin
       s1 := GetProgDir;
       s1 := GetProgDir;
-      if s1[Length(s1)] = ':' then
-        paramstr := s1 + GetProgramName
+      if length(s1) > 0 then
+      begin
+        if s1[Length(s1)] = ':' then
+          paramstr := s1 + GetProgramName
+        else
+          paramstr:=s1+'/'+GetProgramName;
+      end
       else
       else
-        paramstr:=s1+'/'+GetProgramName;
+        paramstr:=GetProgramName;
     end
     end
     else
     else
     begin
     begin