Skip to content

Commit e45aa5c

Browse files
committed
Fix exception on empty argument
1 parent b4683dc commit e45aa5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tools/autogsdoc.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ standard PropertyList format (not the XML format of OS X), using
885885
for (i = 0; i < [argsGiven count]; i++)
886886
{
887887
arg = [argsGiven objectAtIndex: i];
888-
if ([arg characterAtIndex: 0] == '-')
888+
if ([arg length] > 0 && [arg characterAtIndex: 0] == '-')
889889
{
890890
opt = ([arg characterAtIndex: 1] == '-')
891891
? [arg substringFromIndex: 2] : [arg substringFromIndex: 1];

0 commit comments

Comments
 (0)