Fix bug #18739.
[pspp-builds.git] / src / language / stats / aggregate.c
index bf9eb7a9052ad0c7e589818124f64993fadf0bce..d1cfb7dd16a83d7802c0459558c464b8bcd806bf 100644 (file)
@@ -409,6 +409,7 @@ parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict, s
       n_src = 0;
       arg[0].c = NULL;
       arg[1].c = NULL;
+      ds_init_empty (&function_name);
 
       /* Parse the list of target variables. */
       while (!lex_match (lexer, '='))
@@ -451,7 +452,7 @@ parse_aggregate_functions (struct lexer *lexer, const struct dictionary *dict, s
 
       exclude = MV_ANY;
 
-      ds_init_string (&function_name, lex_tokstr (lexer));
+      ds_assign_string (&function_name, lex_tokstr (lexer));
 
       ds_chomp (&function_name, '.');