size_t i = 0;
size_t j = 0;
size_t v_idx;
+
struct pspp_coeff *result = NULL;
if (v != NULL)
{
v_idx = var_get_dict_index (v);
- while (i < n_coef && var_get_dict_index (coefs[i]->v_info->v) != v_idx)
+ while (i < n_coef)
{
+ if (coefs[i]->v_info != NULL)
+ {
+ if (var_get_dict_index (coefs[i]->v_info->v) == v_idx)
+ {
+ break;
+ }
+ }
i++;
}
result = coefs[i];
if (val != NULL)
{
j = i;
- while (j < n_coef && compare_values (pspp_coeff_get_value (coefs[j], v),
- val, var_get_width (v)) != 0)
+ while (j < n_coef && compare_values_short (pspp_coeff_get_value (coefs[j], v),
+ val, v) != 0)
{
j++;
}