wcmd: ignore start and end quotes
André Hentschel
nerv at dawncrow.de
Sat Aug 22 05:08:35 CDT 2009
ignore start and end quotes, as we handle strings with spaces correct anyway.
It also fixes Bug 19778
---
programs/cmd/builtins.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index b544a37..1bf702a 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2072,6 +2072,10 @@ void WCMD_setshow_env (WCHAR *s) {
s += 2;
while (*s && *s==' ') s++;
+ if (*s=='\"' && s[strlenW(s)-1]=='\"') {
+ s[strlenW(s)-1]='\0';
+ s++;
+ }
/* If no parameter, or no '=' sign, return an error */
if (!(*s) || ((p = strchrW (s, '=')) == NULL )) {
@@ -2096,6 +2100,10 @@ void WCMD_setshow_env (WCHAR *s) {
} else {
DWORD gle;
+ if (*s=='\"' && s[strlenW(s)-1]=='\"') {
+ s[strlenW(s)-1]='\0';
+ s++;
+ }
p = strchrW (s, '=');
if (p == NULL) {
env = GetEnvironmentStrings ();
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list