Răsfoiți Sursa

* because EXEFile was changed into an ansistring, @EXEFile was wrong, fixed, resolves #9057

git-svn-id: trunk@8854 -
florian 18 ani în urmă
părinte
comite
1b554f08ce
1 a modificat fișierele cu 7 adăugiri și 3 ștergeri
  1. 7 3
      ide/fpmrun.inc

+ 7 - 3
ide/fpmrun.inc

@@ -180,6 +180,7 @@ procedure TIDEApp.DoRun;
 var
 var
   RunDirect : boolean;
   RunDirect : boolean;
   oldcurrdir : string;
   oldcurrdir : string;
+  s : shortstring;
 begin
 begin
 {$ifndef NODEBUG}
 {$ifndef NODEBUG}
   if not assigned(Debugger) or not Debugger^.HasExe or not Debugger^.IsRunning then
   if not assigned(Debugger) or not Debugger^.HasExe or not Debugger^.IsRunning then
@@ -207,9 +208,10 @@ begin
          ErrorBox(msg_nothingtorun,nil);
          ErrorBox(msg_nothingtorun,nil);
          Exit;
          Exit;
        end;
        end;
+      s:=EXEFile;
       if not ExistsFile(ExeFile) then
       if not ExistsFile(ExeFile) then
         begin
         begin
-          MsgParms[1].Ptr:=@EXEFile;
+          MsgParms[1].Ptr:=@s;
           ErrorBox(msg_invalidfilename,@MsgParms);
           ErrorBox(msg_invalidfilename,@MsgParms);
           Exit;
           Exit;
         end;
         end;
@@ -256,15 +258,17 @@ begin
       { In case we have something that the compiler touched }
       { In case we have something that the compiler touched }
       AskToReloadAllModifiedFiles;
       AskToReloadAllModifiedFiles;
       LastExitCode:=ExecuteResult;
       LastExitCode:=ExecuteResult;
+
+      s:=EXEFile;
       If IOStatus<>0 then
       If IOStatus<>0 then
         begin
         begin
-          MsgParms[1].Ptr:=@EXEFile;
+          MsgParms[1].Ptr:=@s;
           MsgParms[2].long:=IOStatus;
           MsgParms[2].long:=IOStatus;
           InformationBox(msg_programnotrundoserroris,@MsgParms);
           InformationBox(msg_programnotrundoserroris,@MsgParms);
         end
         end
       else If LastExitCode<>0 then
       else If LastExitCode<>0 then
         begin
         begin
-          MsgParms[1].Ptr:=@EXEFile;
+          MsgParms[1].Ptr:=@s;
           MsgParms[2].long:=LastExitCode;
           MsgParms[2].long:=LastExitCode;
           InformationBox(msg_programfileexitedwithexitcode,@MsgParms);
           InformationBox(msg_programfileexitedwithexitcode,@MsgParms);
         end;
         end;