nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a6de09
)
lib/opts: do not crash for empty arguments
author
Jean Privat
<jean@pryen.org>
Tue, 16 Dec 2014 19:10:32 +0000
(14:10 -0500)
committer
Jean Privat
<jean@pryen.org>
Wed, 17 Dec 2014 04:43:30 +0000
(23:43 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/opts.nit
patch
|
blob
|
history
diff --git
a/lib/opts.nit
b/lib/opts.nit
index
5a226b9
..
8c8f9ea
100644
(file)
--- a/
lib/opts.nit
+++ b/
lib/opts.nit
@@
-143,7
+143,7
@@
abstract class OptionParameter
redef fun read_param(it)
do
super
- if it.is_ok and it.item.chars.first != '-' then
+ if it.is_ok and (it.item.is_empty or it.item.chars.first != '-') then
value = convert(it.item)
it.next
else