Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
f3c25e73
Commit
f3c25e73
authored
Aug 13, 2015
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix stack overflow when passing multiple options in one argument
parent
4350368c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
main.ml
main.ml
+2
-2
No files found.
main.ml
View file @
f3c25e73
...
...
@@ -81,7 +81,7 @@ let parse_args () =
|
"-o"
::
filename
::
tl
->
handle
{
args
with
outfile
=
Some
filename
}
tl
|
arg
::
tl
when
String
.
length
arg
>
1
&&
arg
.
[
0
]
=
'
-
'
&&
arg
.
[
1
]
<>
'
-
'
->
|
arg
::
tl
when
String
.
length
arg
>
2
&&
arg
.
[
0
]
=
'
-
'
&&
arg
.
[
1
]
<>
'
-
'
->
let
rec
handle_opts
args
=
function
|
i
when
i
=
String
.
length
arg
->
args
|
i
->
handle_opts
(
handle
args
[
"-"
^
String
.
make
1
arg
.
[
i
]])
(
i
+
1
)
...
...
@@ -89,7 +89,7 @@ let parse_args () =
handle
(
handle_opts
args
1
)
tl
|
arg
::
tl
when
arg
.
[
0
]
=
'
-
'
->
prerr_
string
usage
;
prerr_
endline
usage
;
raise
(
Failure
(
"unknown option "
^
arg
))
|
filename
::
tl
->
...
...
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