From c68f2d175c5a9178afabda4e894816bfe3857fb1 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 4 Jun 2013 09:10:53 -0400 Subject: [PATCH] oops --- dom.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom.d b/dom.d index f261266..7a719a0 100644 --- a/dom.d +++ b/dom.d @@ -4063,8 +4063,10 @@ class Document : FileResource { throw new Exception("tag " ~ tagName ~ " never closed"); else { // let's call it totally empty and do the rest of the file as text. doing it as html could still result in some weird stuff like if(a<4) being read as <4 being a tag so it comes out if(a<4> and other weirdness) It is either a closed script tag or the rest of the file is forfeit. - e = new TextNode(this, data[pos .. $]); - pos = data.length; + if(pos < data.length) { + e = new TextNode(this, data[pos .. $]); + pos = data.length; + } } } else { ending += pos;