Skip to content

Commit

Permalink
Replaced hardcoded string with cmd variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimi1010 committed May 29, 2024
1 parent c677827 commit 519b35a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/Pcap++Test/Tests/LiveDeviceTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class RpcapdServerInitializer

std::string cmd = "rpcapd\\rpcapd.exe";
std::array<char, 256> args;
int res = std::snprintf(args.data(), args.size(), "rpcapd\\rpcapd.exe -b %s -p %d -n", ip.c_str(), port);
int res = std::snprintf(args.data(), args.size(), "%s -b %s -p %d -n", cmd.c_str(), ip.c_str(), port);
if (res < 0)
{
throw std::runtime_error("Error during string formatting");
Expand Down

0 comments on commit 519b35a

Please sign in to comment.