Skip to content

Commit

Permalink
deps: update googletest to 305e5a2
Browse files Browse the repository at this point in the history
PR-URL: #53157
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
nodejs-github-bot authored and marco-ippolito committed Aug 19, 2024
1 parent 743f4d9 commit 5ad13ce
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 5ad13ce

Please sign in to comment.