Skip to content

Commit fd77bb0

Browse files
Tomasz Poradowskitporadowski
authored andcommitted
avoid using unintialized variable
fixes #47
1 parent 286389b commit fd77bb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Win32_Interop/Win32_CommandLine.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,8 @@ void ParseCommandLineArguments(int argc, char** argv) {
621621
string confFilePath;
622622
for (int n = (confFile ? 2 : 1); n < argc; n++) {
623623
if (string(argv[n]).substr(0, 2) == "--") {
624-
string argument = string(argv[n]).substr(2, argument.length() - 2);
624+
string argumentString = string(argv[n]);
625+
string argument = argumentString.substr(2, argumentString.length() - 2);
625626
transform(argument.begin(), argument.end(), argument.begin(), ::tolower);
626627

627628
// Some -- arguments are passed directly to redis.c::main()

0 commit comments

Comments
 (0)