argvsplit: slightly change strategy for splitting arguments

pull/15/head
William Pitcock 2012-05-05 17:44:24 +00:00
parent 4e95401318
commit 5460704d12
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ int argv_split(const char *src, int *argc, char ***argv)
} }
else if (isspace(*src_iter)) else if (isspace(*src_iter))
{ {
if (*(src_iter - 2) != '-' && (*argv)[argc_count] != NULL) if (*(src_iter + 1) == '-' && (*argv)[argc_count] != NULL)
{ {
argc_count++, dst_iter++; argc_count++, dst_iter++;