Fix crash in recode when the INTO variable was invalid.
[pspp] / src / language / lexer / variable-parser.c
index 8c4f8fe8a61acff13b83aee122c76ed2b4140e6c..a45d384293ba9b6251433a60abd4d89480dbc9fa 100644 (file)
@@ -633,7 +633,10 @@ parse_mixed_vars (struct lexer *lexer, const struct dictionary *dict,
       else if (!parse_DATA_LIST_vars (lexer, dict, names, nnames, PV_APPEND))
        goto fail;
     }
-  return 1;
+  if (*nnames == 0)
+    goto fail;
+  
+  return true;
 
 fail:
   for (i = 0; i < *nnames; i++)
@@ -641,7 +644,7 @@ fail:
   free (*names);
   *names = NULL;
   *nnames = 0;
-  return 0;
+  return false;
 }
 
 /* Parses a list of variables where some of the variables may be