X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fattributes.c;h=954314ef4fb07339f599e8f6974582e5b1cf00c3;hb=dc26037479e9887a84375ad6aeb657e45a8a1933;hp=88832fd501f641ebcc041c1558fa3d214047c454;hpb=cd221d80fafb54e550398c6de105d4c1b7f02ba0;p=pspp diff --git a/src/language/dictionary/attributes.c b/src/language/dictionary/attributes.c index 88832fd501..954314ef4f 100644 --- a/src/language/dictionary/attributes.c +++ b/src/language/dictionary/attributes.c @@ -87,12 +87,16 @@ static char * parse_attribute_name (struct lexer *lexer, const char *dict_encoding, size_t *index) { - char *name; - - if (!lex_force_id (lexer) - || !id_is_valid (lex_tokcstr (lexer), dict_encoding, true)) + if (!lex_force_id (lexer)) return NULL; - name = xstrdup (lex_tokcstr (lexer)); + char *error = id_is_valid__ (lex_tokcstr (lexer), dict_encoding); + if (error) + { + lex_error (lexer, "%s", error); + free (error); + return NULL; + } + char *name = xstrdup (lex_tokcstr (lexer)); lex_get (lexer); if (lex_match (lexer, T_LBRACK))