summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Interpreter/Args.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Interpreter/Args.cpp b/lldb/source/Interpreter/Args.cpp
index 6b6fe4649d8..36ea78cee1d 100644
--- a/lldb/source/Interpreter/Args.cpp
+++ b/lldb/source/Interpreter/Args.cpp
@@ -1002,7 +1002,7 @@ bool Args::ContainsEnvironmentVariable(llvm::StringRef env_var_name,
// Check each arg to see if it matches the env var name.
for (size_t i = 0; i < GetArgumentCount(); ++i) {
- auto arg_value = llvm::StringRef::withNullAsEmpty(GetArgumentAtIndex(0));
+ auto arg_value = llvm::StringRef::withNullAsEmpty(GetArgumentAtIndex(i));
llvm::StringRef name, value;
std::tie(name, value) = arg_value.split('=');
OpenPOWER on IntegriCloud