Commit 765d9a14 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

wcmd: Ignore start and end quotes.

parent 2f3ac064
......@@ -2072,6 +2072,8 @@ void WCMD_setshow_env (WCHAR *s) {
s += 2;
while (*s && *s==' ') s++;
if (*s=='\"')
WCMD_opt_s_strip_quotes(s);
/* If no parameter, or no '=' sign, return an error */
if (!(*s) || ((p = strchrW (s, '=')) == NULL )) {
......@@ -2096,6 +2098,9 @@ void WCMD_setshow_env (WCHAR *s) {
} else {
DWORD gle;
if (*s=='\"')
WCMD_opt_s_strip_quotes(s);
p = strchrW (s, '=');
if (p == NULL) {
env = GetEnvironmentStrings ();
......
......@@ -100,6 +100,7 @@ WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string);
void WCMD_HandleTildaModifiers(WCHAR **start, WCHAR *forVariable, WCHAR *forValue, BOOL justFors);
void WCMD_splitpath(const WCHAR* path, WCHAR* drv, WCHAR* dir, WCHAR* name, WCHAR* ext);
void WCMD_opt_s_strip_quotes(WCHAR *cmd);
WCHAR *WCMD_LoadMessage(UINT id);
WCHAR *WCMD_strdupW(WCHAR *input);
void WCMD_strsubstW(WCHAR *start, WCHAR* next, WCHAR* insert, int len);
......
......@@ -457,7 +457,7 @@ WCHAR *WCMD_strtrim_leading_spaces (WCHAR *string) {
*
* Remove first and last quote WCHARacters, preserving all other text
*/
static void WCMD_opt_s_strip_quotes(WCHAR *cmd) {
void WCMD_opt_s_strip_quotes(WCHAR *cmd) {
WCHAR *src = cmd + 1, *dest = cmd, *lastq = NULL;
while((*dest=*src) != '\0') {
if (*src=='\"')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment