From 519b35aba9447eb54d3f39170940e5bba2161846 Mon Sep 17 00:00:00 2001 From: Dimitar Krastev Date: Wed, 29 May 2024 18:24:03 +0300 Subject: [PATCH] Replaced hardcoded string with cmd variable. --- Tests/Pcap++Test/Tests/LiveDeviceTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/Pcap++Test/Tests/LiveDeviceTests.cpp b/Tests/Pcap++Test/Tests/LiveDeviceTests.cpp index 12a96bc712..0cf2ef4cc4 100644 --- a/Tests/Pcap++Test/Tests/LiveDeviceTests.cpp +++ b/Tests/Pcap++Test/Tests/LiveDeviceTests.cpp @@ -124,7 +124,7 @@ class RpcapdServerInitializer std::string cmd = "rpcapd\\rpcapd.exe"; std::array 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");