diff options
author | Kenneth G Raeburn <raeburn@mit.edu> | 1990-05-16 23:04:15 +0000 |
---|---|---|
committer | Kenneth G Raeburn <raeburn@mit.edu> | 1990-05-16 23:04:15 +0000 |
commit | 6bd590358e9245aa37ef332d9a40c45e5f999cd2 (patch) | |
tree | 5be1e61077cec7781e678a62f56b1d0585c1c088 /zwgc/exec.c | |
parent | d88feb612341af9103aa26d1f1149ef9c99c1943 (diff) |
Fixed counting of fields, including accounting for old (broken) zwrite.
Diffstat (limited to 'zwgc/exec.c')
-rw-r--r-- | zwgc/exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zwgc/exec.c b/zwgc/exec.c index 5c123ed..efae0a1 100644 --- a/zwgc/exec.c +++ b/zwgc/exec.c @@ -455,7 +455,10 @@ void exec_process_packet(program, notice) var_set_number_variables_to_fields(notice_fields, notice_fields_length); - number_of_fields = count_nulls(notice_fields, notice_fields_length); + number_of_fields = count_nulls(notice_fields, notice_fields_length)+1; + /* workaround for bug in old zwrite */ + if (notice_fields[notice_fields_length-1] == '\0') + number_of_fields--; var_set_variable_to_number("number_of_fields", number_of_fields); clear_buffer(); |