projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix assert failure when only MOMENT_MEAN is needed on DESCRIPTIVES.
[pspp]
/
src
/
descript.c
diff --git
a/src/descript.c
b/src/descript.c
index 3aafb94e611c2cb6d44af8e1ab99269ea769cdb5..0492b33ed2378a232418f368326974eab88eaf00 100644
(file)
--- a/
src/descript.c
+++ b/
src/descript.c
@@
-742,8
+742,14
@@
calc_descriptives (const struct casefile *cf, void *dsc_)
continue;
}
continue;
}
- if (dv->moments != NULL)
- moments_pass_one (dv->moments, x, weight);
+ if (dv->moments != NULL)
+ {
+ if (dsc->max_moment > MOMENT_MEAN)
+ moments_pass_one (dv->moments, x, weight);
+ else
+ moments_pass_two (dv->moments, x, weight);
+ }
+
if (x < dv->min)
dv->min = x;
if (x > dv->max)
if (x < dv->min)
dv->min = x;
if (x > dv->max)