Fix a bug in views generation (#341)

This commit is contained in:
An Tao 2020-02-03 08:39:48 +08:00 committed by GitHub
parent 58702dc41e
commit ce675c1b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -109,6 +109,10 @@ static void parseLine(std::ofstream &oSrcFile,
{ {
std::string::size_type pos(0); std::string::size_type pos(0);
// std::cout<<line<<"("<<line.length()<<")\n"; // std::cout<<line<<"("<<line.length()<<")\n";
if (line.length() > 0 && line[line.length() - 1] == '\r')
{
line.resize(line.length() - 1);
}
if (line.length() == 0) if (line.length() == 0)
{ {
// std::cout<<"blank line!"<<std::endl; // std::cout<<"blank line!"<<std::endl;