From afd6306286b6472b75f9964c42d5b0910b3a83fc Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 24 Feb 2012 18:43:54 +0000 Subject: [PATCH] Allow macro definitions to be terminated by tok_eof as well as tok_eop, to prevent Halibut tight-looping when a definition is the last thing in a file. git-svn-id: svn://svn.tartarus.org/sgt/halibut@9419 cda61777-01e9-0310-a592-d414129be87e --- input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/input.c b/input.c index 8556d9f..1410022 100644 --- a/input.c +++ b/input.c @@ -978,7 +978,8 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx, rdadd(¯otext, L'\n'); rdadds(¯otext, t.text); dtor(t), t = get_token(in); - if (t.type == tok_eop) break; + if (t.type == tok_eop || t.type == tok_eof) + break; } macrodef(macros, rs.text, macrotext.text, fp); continue; /* next paragraph */ -- 2.11.0