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:
parent
681c6c6231
commit
158a00b591
1 changed files with 5 additions and 5 deletions
|
|
@ -78,13 +78,13 @@ int CLISP::top(Node *n) {
|
|||
/* Get the output file name */
|
||||
String *outfile = Getattr(n, "outfile");
|
||||
|
||||
if (!outfile)
|
||||
output_filename = outfile;
|
||||
else {
|
||||
output_filename = NewString("");
|
||||
Printf(output_filename, "%s%s.lisp", SWIG_output_directory(), module);
|
||||
if (!outfile) {
|
||||
Printf(stderr, "Unable to determine outfile\n");
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
output_filename = NewStringf("%s%s.lisp", SWIG_output_directory(), module);
|
||||
|
||||
f_cl = NewFile(output_filename, "w+", SWIG_output_files());
|
||||
if (!f_cl) {
|
||||
FileErrorDisplay(output_filename);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue