summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorDavid Flatz2023-02-20 11:53:16 +0100
committerDavid Flatz2023-02-20 11:53:16 +0100
commitee42bc77965e4e4fbbea558b092e07623206c1c8 (patch)
treebf72d830e59366cd1a7a47472e1d3af1da827729 /it.class
parent5d5137be29cba9352226ab0781e72b5c20de89b9 (diff)
downloaditools-ee42bc77965e4e4fbbea558b092e07623206c1c8.tar.gz
itools-ee42bc77965e4e4fbbea558b092e07623206c1c8.tar.bz2
itools-ee42bc77965e4e4fbbea558b092e07623206c1c8.zip
only look at first two elements for description of short- and longoption so that later occurrences of - after comma don't overwrite them
Diffstat (limited to 'it.class')
-rw-r--r--it.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it.class b/it.class
index 1082cd6..ed08f95 100644
--- a/it.class
+++ b/it.class
@@ -902,7 +902,7 @@ static function getopt($usage, $p = array())
foreach(explode("\n", trim($usage)) as $usageline)
{
$shortoptname = $shortoptarg = $longoptname = $longoptarg = "";
- foreach (explode(',', $usageline) as $optdesc)
+ foreach (explode(',', $usageline, 2) as $optdesc)
{
$optdesc = trim($optdesc);
if ($matches = (array)it::match('^--(\w[\w-]*)(=[A-Z])?', $optdesc))