diff options
-rw-r--r-- | sources/scala/xml/parsing/ConstructingParser.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/scala/xml/parsing/ConstructingParser.scala b/sources/scala/xml/parsing/ConstructingParser.scala index 04bcba3c9d..99b20b0225 100644 --- a/sources/scala/xml/parsing/ConstructingParser.scala +++ b/sources/scala/xml/parsing/ConstructingParser.scala @@ -10,7 +10,7 @@ object ConstructingParser { val p = new ConstructingParser() { val input = inp; override val handle = theHandle; - def nextch = { ch = input.next; pos = input.pos; } + def nextch = if(input.hasNext) { ch = input.next; pos = input.pos; } override val preserveWS = true; /** report a syntax error */ |