projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed problems with justification
[pspp]
/
src
/
math
/
coefficient.c
diff --git
a/src/math/coefficient.c
b/src/math/coefficient.c
index 5872b576fabfc82227aac28dae759ec43ded96ac..f738c783f241fedd1137d3100a372c5664b8341b 100644
(file)
--- a/
src/math/coefficient.c
+++ b/
src/math/coefficient.c
@@
-160,13
+160,21
@@
pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
size_t i = 0;
size_t j = 0;
size_t v_idx;
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);
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];
i++;
}
result = coefs[i];
@@
-179,7
+187,7
@@
pspp_coeff_var_to_coeff (const struct variable *v, struct pspp_coeff **coefs,
{
j = i;
while (j < n_coef && compare_values (pspp_coeff_get_value (coefs[j], v),
{
j = i;
while (j < n_coef && compare_values (pspp_coeff_get_value (coefs[j], v),
- val, v
ar_get_width (v)
) != 0)
+ val, v) != 0)
{
j++;
}
{
j++;
}