From: Clifford Wolf Date: Wed, 29 Oct 2014 08:05:17 +0000 (+0100) Subject: Added support for empty lines to here documents X-Git-Tag: yosys-0.4~17 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=269e37e969562275f337362b5423e2801f9c5765;p=yosys.git Added support for empty lines to here documents --- diff --git a/kernel/register.cc b/kernel/register.cc index 33c129d83..2927a333e 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -333,8 +333,8 @@ void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector 0 && (buffer[buffer.size() - 1] == '\n' || buffer[buffer.size() - 1] == '\r')) break; } - int indent = buffer.find_first_not_of(" \t\r\n"); - if (buffer.substr(indent, eot_marker.size()) == eot_marker) + size_t indent = buffer.find_first_not_of(" \t\r\n"); + if (indent != std::string::npos && buffer.substr(indent, eot_marker.size()) == eot_marker) break; last_here_document += buffer; }