Skip to content

Commit

Permalink
Fix reading from stdin.
Browse files Browse the repository at this point in the history
  • Loading branch information
wmcbrine committed Sep 4, 2018
1 parent 48644f5 commit 4bc32b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions getopt_td.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ int getopt_td(int argc, const char **argv, const char *optstring,
return -1;
}

if (place[1] == '\0')
{
return -1;
}

place++;

if (place[0] == '-' && place[1] == '\0')
Expand Down

0 comments on commit 4bc32b0

Please sign in to comment.