From 04d004b9593e1b6502a18c7be4f612dde5c6bce6 Mon Sep 17 00:00:00 2001 From: chatlanin Date: Tue, 10 May 2022 15:20:02 +0300 Subject: [PATCH] fix utils/exec --- src/utils/utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index ecc5728..d2e489f 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -46,11 +46,11 @@ namespace hack::utils } } - inline std::string exec(const char* cmd) + inline std::string exec(const std::string& cmd) { std::string result; std::array buffer; - std::unique_ptr pipe(popen(cmd, "r"), pclose); + std::unique_ptr pipe(popen(cmd.c_str(), "r"), pclose); if (!pipe) {