소스 검색

Merged revisions 2112 via svnmerge from
http://[email protected]/svn/fpc/trunk

........
r2112 | hajny | 2006-01-01 23:28:25 +0000 (Sun, 01 Jan 2006) | 1 line

* fixed occassional crash during InitArguments
........

git-svn-id: branches/fixes_2_0@2113 -

Tomas Hajny 20 년 전
부모
커밋
e5de6fbb9f
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  1. 2 8
      rtl/os2/system.pas

+ 2 - 8
rtl/os2/system.pas

@@ -526,16 +526,10 @@ begin
   PC := PChar (PIB^.Cmd) + ArgLen;
 
 (* ArgLen contains size of command line arguments including leading space. *)
-  ArgLen := StrLen (PC);
-(* Just to make sure the leading space is there for all OS/2 versions... *)
-  if PC^ <> ' ' then
-   begin
-    CmdLine [ArgVLen] := ' ';
-    Inc (ArgVLen);
-   end;
+  ArgLen := Succ (StrLen (PC));
 
   SysReallocMem (CmdLine, ArgVLen + ArgLen);
-(* Ending #0 after program name gets overwritten with space from PIB^.Cmd. *)
+
   Move (PC^, CmdLine [ArgVLen], Succ (ArgLen));
 
 (* ArgV has space for 8 parameters from the first allocation. *)