projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add even more expression tests and fix the bugs they found.
[pspp]
/
src
/
moments.c
diff --git
a/src/moments.c
b/src/moments.c
index c4f3fe18db76573a38c5a8869540f64a0a6aa19a..3890cbde441d83867c319c3b2a256c6a0bad274c 100644
(file)
--- a/
src/moments.c
+++ b/
src/moments.c
@@
-501,14
+501,14
@@
read_values (double **values, double **weights, size_t *cnt)
*values = NULL;
*weights = NULL;
*cnt = 0;
*values = NULL;
*weights = NULL;
*cnt = 0;
- while (
token == T_NUM)
+ while (
lex_is_number ())
{
double value = tokval;
double weight = 1.;
lex_get ();
if (lex_match ('*'))
{
{
double value = tokval;
double weight = 1.;
lex_get ();
if (lex_match ('*'))
{
- if (
token != T_NUM)
+ if (
!lex_is_number ())
{
lex_error (_("expecting weight value"));
return 0;
{
lex_error (_("expecting weight value"));
return 0;