From 269e37e969562275f337362b5423e2801f9c5765 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 29 Oct 2014 09:05:17 +0100 Subject: [PATCH] Added support for empty lines to here documents --- kernel/register.cc | 4 ++-- 1 file 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 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; } -- 2.30.2