Change "union value" to dynamically allocate long strings.
[pspp-builds.git] / src / math / coefficient.c
index 1f157433ee21a901eda70718313a2f5edc18c676..f78895f8214e4b70b89668477ac1dfe1abc98fe2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009 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 published by
@@ -185,9 +185,12 @@ pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
           */
          if (val != NULL)
            {
+              int width = var_get_width (v);
+
              j = i;
-             while (j < n_coef && compare_values_short (pspp_coeff_get_value (coefs[j], v),
-                                                         val, v) != 0)
+             while (j < n_coef
+                     && value_compare_3way (pspp_coeff_get_value (coefs[j], v),
+                                            val, width) != 0)
                {
                  j++;
                }