diff --git a/reactos/subsys/system/cmd/set.c b/reactos/subsys/system/cmd/set.c index 6883145cf86..005e6ac6df7 100644 --- a/reactos/subsys/system/cmd/set.c +++ b/reactos/subsys/system/cmd/set.c @@ -94,7 +94,10 @@ INT cmd_set (LPTSTR cmd, LPTSTR param) /* set or remove environment variable */ *p = _T('\0'); p++; - + if (*p == _T('\0')) + { + p = NULL; + } SetEnvironmentVariable (param, p); } else