From: Jason H Stover Date: Mon, 19 Jan 2009 20:20:17 +0000 (-0500) Subject: Fixed bug in compare_values_short. Reported by Ben Pfaff. X-Git-Tag: v0.7.1~3^2 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1870f69a33f783ca49bf1827ba13a0463dbc189a;p=pspp-builds.git Fixed bug in compare_values_short. Reported by Ben Pfaff. --- diff --git a/src/math/covariance-matrix.c b/src/math/covariance-matrix.c index b6411fb3..4f14a7c6 100644 --- a/src/math/covariance-matrix.c +++ b/src/math/covariance-matrix.c @@ -400,14 +400,14 @@ match_nodes (const struct covariance_accumulator *c, } if (var_is_numeric (v1) && var_is_alpha (v2)) { - if (compare_values_short (val2, c->val2, v2)) + if (!compare_values_short (val2, c->val2, v2)) { return 0; } } if (var_is_alpha (v1) && var_is_numeric (v2)) { - if (compare_values_short (val1, c->val1, v1)) + if (!compare_values_short (val1, c->val1, v1)) { return 0; } @@ -416,7 +416,7 @@ match_nodes (const struct covariance_accumulator *c, { if (compare_values_short (val1, c->val1, v1)) { - if (compare_values_short (val2, c->val2, v2)) + if (!compare_values_short (val2, c->val2, v2)) { return 0; }