[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/expressions/parse.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] Changes to pspp/src/expressions/parse.c |
Date: |
Thu, 28 Apr 2005 21:58:30 -0400 |
Index: pspp/src/expressions/parse.c
diff -u pspp/src/expressions/parse.c:1.8 pspp/src/expressions/parse.c:1.9
--- pspp/src/expressions/parse.c:1.8 Fri Apr 29 01:29:31 2005
+++ pspp/src/expressions/parse.c Fri Apr 29 01:58:28 2005
@@ -1204,15 +1204,18 @@
n = expr_allocate_composite (e, f - operations, args, arg_cnt);
n->composite.min_valid = min_valid != -1 ? min_valid : f->array_min_elems;
- if (n->type == OP_LAG_Vn || n->type == OP_LAG_Vs)
- n_lag = 1;
+ if (n->type == OP_LAG_Vn || n->type == OP_LAG_Vs)
+ {
+ if (n_lag < 1)
+ n_lag = 1;
+ }
else if (n->type == OP_LAG_Vnn || n->type == OP_LAG_Vsn)
{
int n_before;
assert (n->composite.arg_cnt == 2);
assert (n->composite.args[1]->type == OP_pos_int);
n_before = n->composite.args[1]->integer.i;
- if (n_before > n_lag)
+ if (n_lag < n_before)
n_lag = n_before;
}