Browse Source

* ensure passing valid stacksize to emxbind

git-svn-id: trunk@29700 -
Tomas Hajny 10 years ago
parent
commit
7e15bf6c2d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/systems/t_os2.pas

+ 2 - 2
compiler/systems/t_os2.pas

@@ -520,10 +520,10 @@ begin
          StackSizeKB := 64
          StackSizeKB := 64
         else if StackSizeKB > (512 shl 10) then
         else if StackSizeKB > (512 shl 10) then
          StackSizeKB := 512 shl 10;
          StackSizeKB := 512 shl 10;
-        Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
+        Replace(cmdstr,'$STACKKB',tostr(StackSizeKB));
         {When an EMX program runs in DOS, the heap and stack share the
         {When an EMX program runs in DOS, the heap and stack share the
          same memory pool. The heap grows upwards, the stack grows downwards.}
          same memory pool. The heap grows upwards, the stack grows downwards.}
-        Replace(cmdstr,'$DOSHEAPKB',tostr((stacksize+1023) shr 10));
+        Replace(cmdstr,'$DOSHEAPKB',tostr(StackSizeKB));
         Replace(cmdstr,'$STRIP ', StripStr);
         Replace(cmdstr,'$STRIP ', StripStr);
         Replace(cmdstr,'$MAP ', MapStr);
         Replace(cmdstr,'$MAP ', MapStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);
         Replace(cmdstr,'$APPTYPE',AppTypeStr);