Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mincss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
mincss
Commits
f3c25e73
Commit
f3c25e73
authored
9 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Fix stack overflow when passing multiple options in one argument
parent
4350368c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main.ml
+2
-2
2 additions, 2 deletions
main.ml
with
2 additions
and
2 deletions
main.ml
+
2
−
2
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_
str
in
g
usage
;
prerr_
endl
in
e
usage
;
raise
(
Failure
(
"unknown option "
^
arg
))
|
filename
::
tl
->
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment