X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fweight.c;h=56229a285d1e6b9f8fb90ef9212553f852b31820;hb=888d0f91d57e0c3c5a4206c30ac71eb87bf44227;hp=33f0cbda38ea1115fd5cfb830e7876320b089348;hpb=65e61cc92b48297625bc71cf31b8a19e301eb6c1;p=pspp-builds.git diff --git a/src/language/dictionary/weight.c b/src/language/dictionary/weight.c index 33f0cbda..56229a28 100644 --- a/src/language/dictionary/weight.c +++ b/src/language/dictionary/weight.c @@ -47,12 +47,12 @@ cmd_weight (struct lexer *lexer, struct dataset *ds) v = parse_variable (lexer, dict); if (!v) return CMD_CASCADING_FAILURE; - if (v->type == ALPHA) + if (var_is_alpha (v)) { msg (SE, _("The weighting variable must be numeric.")); return CMD_CASCADING_FAILURE; } - if (dict_class_from_id (v->name) == DC_SCRATCH) + if (dict_class_from_id (var_get_name (v)) == DC_SCRATCH) { msg (SE, _("The weighting variable may not be scratch.")); return CMD_CASCADING_FAILURE;