From 20e5b3e586b25508cdfa7e59b08425d71c1d3514 Mon Sep 17 00:00:00 2001 From: nickysn Date: Mon, 12 Oct 2015 17:59:51 +0000 Subject: [PATCH] * handle empty environment correctly when initializing argv0 under msdos. Patch by Max Nazhalov, mantis #28705. git-svn-id: trunk@32028 - --- rtl/msdos/system.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtl/msdos/system.pp b/rtl/msdos/system.pp index 57ee13e6ef..ac6ca41187 100644 --- a/rtl/msdos/system.pp +++ b/rtl/msdos/system.pp @@ -202,6 +202,8 @@ begin dos_env_count := env_count; if dos_version >= $300 then begin + if cp=dos_env then + inc(cp); inc(cp, 3); dos_argv0 := cp; end