X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fchisquare.c;h=a406edc7433d8ff9ef9f128d68385e32ef590f12;hb=11d2ffde279bad43d0c271f7fbfad383969e063f;hp=3accc7534ee136660dcc968626a33216e8d7ce89;hpb=08e4a9535a7e1de9cc4b6e619e70805ab951b323;p=pspp diff --git a/src/language/stats/chisquare.c b/src/language/stats/chisquare.c index 3accc7534e..a406edc743 100644 --- a/src/language/stats/chisquare.c +++ b/src/language/stats/chisquare.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. - Copyright (C) 2006 Free Software Foundation, Inc. - Written by John Darrington + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -148,7 +147,7 @@ create_freq_hash (const struct dictionary *dict, struct hsh_table *freq_hash = hsh_create (4, compare_freq, hash_freq, - free_freq_hash, + free_freq_mutable_hash, (void *) var); while (casereader_read(r, &c)) @@ -173,7 +172,8 @@ create_freq_hash (const struct dictionary *dict, } else { - *existing_fr = fr; + *existing_fr = fr; + fr->value = value_dup (fr->value, var_get_width (var)); } case_destroy (&c);