From dfcba0ab77334f8a9572488c6cd034b567e11a91 Mon Sep 17 00:00:00 2001 From: Camille Chauvet Date: Tue, 3 Oct 2023 15:51:22 +0000 Subject: [PATCH] ex00: fix: check header only in database --- ex00/src/BitcoinExchange.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex00/src/BitcoinExchange.cpp b/ex00/src/BitcoinExchange.cpp index c774b04..d6dd6ca 100644 --- a/ex00/src/BitcoinExchange.cpp +++ b/ex00/src/BitcoinExchange.cpp @@ -80,7 +80,7 @@ static int check_value(const std::string& value_str, int flag, float& out) static int check_line(const std::string& line, regex_t& reegex, const std::string& delimiter, int flag, std::pair& out) { - if (line == "date,exchange_rate") + if (flag == DATABASE && line == "date,exchange_rate") return 1; if (regexec(&reegex, line.c_str(), 0, NULL, 0) == REG_NOMATCH) {