diff --git a/rtl/os2/system.pas b/rtl/os2/system.pas index 9557b374d1..8113344fb7 100644 --- a/rtl/os2/system.pas +++ b/rtl/os2/system.pas @@ -1055,7 +1055,7 @@ begin (* ArgLen contains size of command line arguments including leading space. *) ArgLen := Succ (StrLen (PC)); - SysReallocMem (CmdLine, ArgVLen + ArgLen); + SysReallocMem (CmdLine, ArgVLen + Succ (ArgLen)); Move (PC^, CmdLine [ArgVLen], Succ (ArgLen));