浏览代码

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

git-svn-id: trunk@8854 -
florian 18 年之前
父节点
当前提交
1b554f08ce
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      ide/fpmrun.inc

+ 7 - 3
ide/fpmrun.inc

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