From be5cdb2748f594100b1f651c65a01dfb31e6da63 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sat, 9 Jul 2005 03:40:44 +0000 Subject: [PATCH] add one last breakage fix git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2838 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/files.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/files.c b/src/files.c index 7fe590a0..0440fe34 100644 --- a/src/files.c +++ b/src/files.c @@ -167,9 +167,10 @@ void open_buffer(const char *filename) } #endif - /* If the filename isn't blank, open the file. */ - if (filename[0] != '\0') - rc = open_file(filename, new_buffer, &f); + /* If the filename isn't blank, open the file. Otherwise, treat it + * as a new file. */ + rc = (filename[0] != '\0') ? open_file(filename, new_buffer, &f) : + -2; /* If we're loading into a new buffer, add a new openfile entry. */ if (new_buffer) -- 2.39.5