[nasm:debug-macros] assemble: don't pass a NULL filename to dfmt->linenum

nasm-bot for H. Peter Anvin (Intel) hpa at zytor.com
Thu Jul 9 17:51:10 PDT 2020


Commit-ID:  f399172a832b086670be5593af5394a93be960e9
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=f399172a832b086670be5593af5394a93be960e9
Author:     H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Wed, 8 Jul 2020 10:26:32 -0700
Committer:  H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Wed, 8 Jul 2020 10:26:32 -0700

assemble: don't pass a NULL filename to dfmt->linenum

Don't pass a NULL filename to dfmt->linenum even if -Lb is in use; it
confuses the heck out of some debug backends.

Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>


---
 asm/assemble.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/asm/assemble.c b/asm/assemble.c
index 2843a84b..3d85e472 100644
--- a/asm/assemble.c
+++ b/asm/assemble.c
@@ -424,7 +424,7 @@ static void out(struct out_data *data)
      * changed, and the amount by which lineno changed,
      * if it did. thus, these variables must be static
      */
-    if (src_get(&lineno, &lnfname))
+    if (src_get(&lineno, &lnfname) && lnfname)
         dfmt->linenum(lnfname, lineno, data->segment);
 
     if (asize > amax) {


More information about the Nasm-commits mailing list