summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2016-03-04 20:44:42 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2016-03-04 20:44:42 +0300
commit92c02bb50df5a6489b618dd6a687ed8514762ecb (patch)
treebbe5bf13c4a2febc3b0f80436f59892de62250a2
parenta9a1b5c318e7bcb7680483c51933c6f3d6c69cd9 (diff)
downloadnasm-92c02bb50df5a6489b618dd6a687ed8514762ecb.tar.gz
listing: Don't try to open non-specified listing
By default we setup @listname to '\0' and if has not been specified in command line it is passed in this form into list_init() which cause | [cyrill@uranus nasm.git] ./nasm -felf64 t.asm | nasm: error: unable to open listing file `' So make a proper test here. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--listing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listing.c b/listing.c
index fa850448..46a2cbfd 100644
--- a/listing.c
+++ b/listing.c
@@ -128,7 +128,7 @@ static void list_emit(void)
static void list_init(const char *fname)
{
- if (!fname) {
+ if (!fname || fname[0] == '\0') {
listfp = NULL;
return;
}