From ce675c1b871c9961a5b47d2e4c6cc1064a9296e8 Mon Sep 17 00:00:00 2001 From: An Tao Date: Mon, 3 Feb 2020 08:39:48 +0800 Subject: [PATCH] Fix a bug in views generation (#341) --- drogon_ctl/create_view.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drogon_ctl/create_view.cc b/drogon_ctl/create_view.cc index 30ccab64..cbbedf2c 100644 --- a/drogon_ctl/create_view.cc +++ b/drogon_ctl/create_view.cc @@ -109,6 +109,10 @@ static void parseLine(std::ofstream &oSrcFile, { std::string::size_type pos(0); // std::cout< 0 && line[line.length() - 1] == '\r') + { + line.resize(line.length() - 1); + } if (line.length() == 0) { // std::cout<<"blank line!"<