--- trunk/reactos/subsys/system/cmd/prompt.c 2005-09-03 11:50:23 UTC (rev 17619)
+++ trunk/reactos/subsys/system/cmd/prompt.c 2005-09-03 11:51:22 UTC (rev 17620)
@@ -204,12 +204,20 @@
return 0;
}
+ /* if it is null, then it needs to set to default,
+ because that means the user entered "prompt" only.
+ so even if param is null you _must_ still set prompt
+ to the default. There seems to be some kinda difference
+ between winxp and 2k in this matter and this way will
+ cover both. */
+ if (param[0] != _T('\0'))
+ _tcscpy(szParam,param);
+ else
+ _tcscpy(szParam,_T("$P$G"));
+
/* set PROMPT environment variable */
- if (param[0] != _T('\0'))
- {
- if (!SetEnvironmentVariable (_T("PROMPT"), param))
- return 1;
- }
+ if (!SetEnvironmentVariable (_T("PROMPT"), szParam))
+ return 1;
return 0;
}