From 099f8a308f363cfe456957fb2247f30aa81b439a Mon Sep 17 00:00:00 2001 From: Mikhail Atuchin Date: Wed, 4 Feb 2026 21:45:04 +0400 Subject: [PATCH] Fix issues with std::vector::erase --- omaha/base/commands.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omaha/base/commands.cc b/omaha/base/commands.cc index 573c6f5b..28f77c7e 100644 --- a/omaha/base/commands.cc +++ b/omaha/base/commands.cc @@ -562,13 +562,13 @@ HRESULT CommandParsing::Remove(const TCHAR* option_name) { if (i == -1) { return E_FAIL; } - args_.erase(it); + it = args_.erase(it); if (!as_name_value_pair_) { if (options_[i].type != COMMAND_OPTION_BOOL) { if (it == args_.end()) { return E_FAIL; } - args_.erase(it); + it = args_.erase(it); } }