Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bd19402b
Commit
bd19402b
authored
Jan 31, 2017
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notepad: Only skip valid command options.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
57b83e14
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
main.c
programs/notepad/main.c
+14
-7
No files found.
programs/notepad/main.c
View file @
bd19402b
...
...
@@ -615,7 +615,7 @@ static int AlertFileDoesNotExist(LPCWSTR szFileName)
static
void
HandleCommandLine
(
LPWSTR
cmdline
)
{
WCHAR
delimiter
;
WCHAR
delimiter
,
*
ptr
;
BOOL
opt_print
=
FALSE
;
/* skip white space */
...
...
@@ -630,22 +630,29 @@ static void HandleCommandLine(LPWSTR cmdline)
if
(
*
cmdline
==
delimiter
)
cmdline
++
;
while
(
*
cmdline
==
' '
||
*
cmdline
==
'-'
||
*
cmdline
==
'/'
)
ptr
=
cmdline
;
while
(
*
ptr
==
' '
||
*
ptr
==
'-'
||
*
ptr
==
'/'
)
{
WCHAR
option
;
if
(
*
cmdline
++
==
' '
)
continue
;
if
(
*
ptr
++
==
' '
)
continue
;
option
=
*
cmdline
;
if
(
option
)
cmdline
++
;
while
(
*
cmdline
==
' '
)
cmdline
++
;
option
=
*
ptr
;
if
(
option
)
ptr
++
;
while
(
*
ptr
==
' '
)
ptr
++
;
switch
(
option
)
{
case
'p'
:
case
'P'
:
opt_print
=
TRUE
;
{
if
(
!
opt_print
)
{
opt_print
=
TRUE
;
cmdline
=
ptr
;
}
break
;
}
}
}
...
...
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