Fix potential crash in clisp

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-20 23:28:43 +00:00
commit 158a00b591

View file

@ -78,13 +78,13 @@ int CLISP::top(Node *n) {
/* Get the output file name */ /* Get the output file name */
String *outfile = Getattr(n, "outfile"); String *outfile = Getattr(n, "outfile");
if (!outfile) if (!outfile) {
output_filename = outfile; Printf(stderr, "Unable to determine outfile\n");
else { SWIG_exit(EXIT_FAILURE);
output_filename = NewString("");
Printf(output_filename, "%s%s.lisp", SWIG_output_directory(), module);
} }
output_filename = NewStringf("%s%s.lisp", SWIG_output_directory(), module);
f_cl = NewFile(output_filename, "w+", SWIG_output_files()); f_cl = NewFile(output_filename, "w+", SWIG_output_files());
if (!f_cl) { if (!f_cl) {
FileErrorDisplay(output_filename); FileErrorDisplay(output_filename);