Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
423929ad
Commit
423929ad
authored
Jan 11, 2009
by
Erich Hoover
Committed by
Alexandre Julliard
Jan 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wcmd: Handle batch scripts containing quotes within quotes.
parent
000136ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
wcmdmain.c
programs/cmd/wcmdmain.c
+7
-3
No files found.
programs/cmd/wcmdmain.c
View file @
423929ad
...
...
@@ -1676,7 +1676,7 @@ static void WCMD_addCommand(WCHAR *command, int *commandLen,
WCHAR
*
WCMD_ReadAndParseLine
(
WCHAR
*
optionalcmd
,
CMD_LIST
**
output
,
HANDLE
readFrom
)
{
WCHAR
*
curPos
;
BOOL
inQuotes
=
FALSE
;
int
inQuotes
=
0
;
WCHAR
curString
[
MAXSTRING
];
int
curStringLen
=
0
;
WCHAR
curRedirs
[
MAXSTRING
];
...
...
@@ -1900,7 +1900,11 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
}
break
;
case
'"'
:
inQuotes
=
!
inQuotes
;
case
'"'
:
if
(
inQuotes
&&
*
(
curPos
+
1
)
==
' '
)
{
inQuotes
--
;
/* An end quote must be proceeded by a space */
}
else
{
inQuotes
++
;
/* Quotes within quotes are fun! */
}
curCopyTo
[(
*
curLen
)
++
]
=
*
curPos
;
lastWasRedirect
=
FALSE
;
break
;
...
...
@@ -2042,7 +2046,7 @@ WCHAR *WCMD_ReadAndParseLine(WCHAR *optionalcmd, CMD_LIST **output, HANDLE readF
if
(
*
curPos
==
0x00
&&
curDepth
>
0
&&
readFrom
!=
INVALID_HANDLE_VALUE
)
{
inRem
=
FALSE
;
prevDelim
=
CMD_NONE
;
inQuotes
=
FALSE
;
inQuotes
=
0
;
memset
(
extraSpace
,
0x00
,
(
MAXSTRING
+
1
)
*
sizeof
(
WCHAR
));
/* Read more, skipping any blank lines */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment