1fec06951a2a — russes02 11 years ago
Ports fixes from CDR to KOP
1 files changed, 10 insertions(+), 0 deletions(-)

M kop.go
M kop.go +10 -0
@@ 34,6 34,16 @@ func (s *KOPSites) NextPage() Page {
 	}
 	var state int
 	var message string
+	if len(line) < 12 {
+		if len(line) < 11 {
+			log.Printf("bad input data: %v", line)
+			return s.NextPage()
+		} else {
+			s.counts[line[5]]++
+			state = PANIC
+			message = "MIGRATION " + line[5]
+		}
+	}
 	if line[5] == "1" && line[11] != "" {
 		s.processed++
 		state = NEW