mirror of
https://github.com/gflags/gflags.git
synced 2025-04-05 05:25:04 +00:00
Fix V728 excessive check
This commit is contained in:
parent
cad38c919c
commit
6e536553ef
1 changed files with 1 additions and 2 deletions
|
@ -1036,8 +1036,7 @@ uint32 CommandLineFlagParser::ParseNewCommandLineFlags(int* argc, char*** argv,
|
|||
char* arg = (*argv)[i];
|
||||
|
||||
// Like getopt(), we permute non-option flags to be at the end.
|
||||
if (arg[0] != '-' || // must be a program argument
|
||||
(arg[0] == '-' && arg[1] == '\0')) { // "-" is an argument, not a flag
|
||||
if (arg[0] != '-' || arg[1] == '\0') { // must be a program argument "-" is an argument, not a flag
|
||||
memmove((*argv) + i, (*argv) + i+1, (*argc - (i+1)) * sizeof((*argv)[i]));
|
||||
(*argv)[*argc-1] = arg; // we go last
|
||||
first_nonopt--; // we've been pushed onto the stack
|
||||
|
|
Loading…
Add table
Reference in a new issue