From 59c50b49670a56c3fed8e336a598b2dfd84cc7a6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johan=20Sch=C3=B6n?= <js@opera.com>
Date: Wed, 6 May 1998 23:20:07 +0200
Subject: [PATCH] Dividing the empty string with something caused problems in
 newer Pikes

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.14
---
 lib/modules/Protocols.pmod/DNS.pmod | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/modules/Protocols.pmod/DNS.pmod b/lib/modules/Protocols.pmod/DNS.pmod
index aebeacc13d..860c588353 100644
--- a/lib/modules/Protocols.pmod/DNS.pmod
+++ b/lib/modules/Protocols.pmod/DNS.pmod
@@ -248,8 +248,8 @@ class client {
 	
 	etc_hosts = ([ "localhost":"127.0.0.1" ]);
 	
-	if (raw) {
-	  foreach(raw/"\n", string line) {
+	if (raw && sizeof(raw)) {
+	  foreach(raw/"\n"-({""}), string line) {
 	    // Handle comments, and split the line on white-space
 		 line = lower_case(replace((line/"#")[0], "\t", " "));
 	    array arr = (line/" ") - ({ "" });
-- 
GitLab