changeset 553:3a173cefc814

Fix missing NULL guard found by gcc static analysis Fix a missing NULL guard in listing pass found with gcc analyzer.
author William Astle <lost@l-w.ca>
date Thu, 06 Jul 2023 12:06:22 -0600
parents f9ffd1935cee
children 7627d2b3b81f
files lwasm/list.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lwasm/list.c	Fri Jun 30 09:40:17 2023 -0600
+++ b/lwasm/list.c	Thu Jul 06 12:06:22 2023 -0600
@@ -269,7 +269,7 @@
 
 		if (as -> tabwidth == 0)
 		{
-			fputs(cl -> ltext, of);
+			if (of) fputs(cl -> ltext, of);
 		}
 		else 
 		{