Branch: Tag:

1998-05-06

1998-05-06 21:20:07 by Johan Schön <js@opera.com>

Dividing the empty string with something caused problems in newer Pikes

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.14

248:       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/" ") - ({ "" });