Skip to content

Commit

Permalink
deps: update googletest to 305e5a2
Browse files Browse the repository at this point in the history
  • Loading branch information
nodejs-github-bot authored and marco-ippolito committed May 31, 2024
1 parent 54035ac commit ede7d5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deps/googletest/src/gtest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6700,17 +6700,17 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) {
}

if (remove_flag) {
// Shift the remainder of the argv list left by one. Note
// that argv has (*argc + 1) elements, the last one always being
// NULL. The following loop moves the trailing NULL element as
// well.
for (int j = i; j != *argc; j++) {
argv[j] = argv[j + 1];
// Shift the remainder of the argv list left by one.
for (int j = i + 1; j < *argc; ++j) {
argv[j - 1] = argv[j];
}

// Decrements the argument count.
(*argc)--;

// Terminate the array with nullptr.
argv[*argc] = nullptr;

// We also need to decrement the iterator as we just removed
// an element.
i--;
Expand Down

0 comments on commit ede7d5f

Please sign in to comment.