From 6279bb1917f7b616fe401cac4aab84cdfe2ec78f Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Sun, 12 Feb 2012 21:52:20 +0100 Subject: [PATCH] Txt record parsing works -- need to look at the on-the-wire stuff --- zscan_rr.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zscan_rr.go b/zscan_rr.go index 12e8df6e..32e45e49 100644 --- a/zscan_rr.go +++ b/zscan_rr.go @@ -717,14 +717,15 @@ func setTXT(h RR_Header, c chan lex, f string) (RR, *ParseError) { quoted = true } for l.value != _NEWLINE && l.value != _EOF { - println("SEEN", l.value, l.token) switch l.value { case _STRING: s = append(s, l.token) i++ case _BLANK: if !quoted { - // i = 0, shouldn't happen here + if i = 0 { + return nil, &ParseError{f, "bad TXT txt", l} + } s[i-1] += l.token l = <-c continue