diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-10-29 09:05:17 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-10-29 09:05:17 +0100 |
commit | 269e37e969562275f337362b5423e2801f9c5765 (patch) | |
tree | 34822229d1942557f5f5ca62e6e609e6abdf1ea3 /kernel | |
parent | 37aa2e02db2f3070a153a1de04c0ce99d1369adb (diff) | |
download | yosys-269e37e969562275f337362b5423e2801f9c5765.tar.gz yosys-269e37e969562275f337362b5423e2801f9c5765.tar.bz2 yosys-269e37e969562275f337362b5423e2801f9c5765.zip |
Added support for empty lines to here documents
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<s if (buffer.size() > 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; } |